#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    1
    Rep Power
    0
    this is the warning i get
    Warning: 0 is not a MySQL result index in ////allproject.php3 on line 27
    This is the code
    <?php
    require('./common.inc');
    $conn=conn();
    $today = time();
    if ($closed != 1)
    $r = mysql_query("select pri.*, pri.des as prdes, p.*, s.*, s.des as sdes, p.des as pdes , u.* from pri, project p, status s, user u where u.uid=p.uid and s.sid = p.sid and pri.prid = p.prid and s.des <> 'Closed' order by $order desc", $conn);
    else if ($closed == 1)
    $r = mysql_query("select pri.*, pri.des as prdes, p.*, s.*, s.des as sdes, p.des as pdes , u.* from pri, project p, status s, user u where u.uid=p.uid and s.sid = p.sid and pri.prid = p.prid and s.des = 'Closed' order by $order desc", $conn);
    unset($valid_row);
    $valid_row = mysql_fetch_row($r,1);
    $vrow=1;
    while ($valid_row) {
    $pid = mysql_result($r,0,"pid");
    $status=mysql_result($r,0,"sdes");

    seems to me it does not like
    $valid_row = mysql_fetch_row($r,1);
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 1999
    Location
    Annapolis, Maryland US
    Posts
    113
    Rep Power
    16
    try
    $valid_row=mysql_fetch_row($r);

    Just curious about the second argument (1) in the mysql_fetch_row function?

    otherwise, try the ever helpful mysql_error();

    print(mysql_error());

Similar Threads

  1. What's wrong w/this code?
    By bubblingangel in forum Visual Basic Programming
    Replies: 2
    Last Post: February 3rd, 2004, 02:24 PM
  2. could you tell what is wrong with this code?
    By skyrtz in forum Visual Basic Programming
    Replies: 3
    Last Post: February 3rd, 2004, 08:32 AM
  3. What's wrong with this code...
    By 123 in forum PHP Development
    Replies: 5
    Last Post: July 29th, 2003, 09:59 AM
  4. What's wrong on this code (connecting to MSSQL)
    By PWH in forum ASP Programming
    Replies: 1
    Last Post: March 8th, 2003, 04:40 AM
  5. what's wrong with this php code?
    By fauzi in forum PHP Development
    Replies: 5
    Last Post: March 19th, 2001, 06:57 PM

IMN logo majestic logo threadwatch logo seochat tools logo