|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
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()); |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > can any one tell me whats wrong with this code? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|