Jump to content

mysql_fetch_array error


Drag00n

Recommended Posts

<?php
$res = mysql_query("SELECT * FROM `events` WHERE `to` = '".$_SESSION['userid']."' LIMIT 5");
	while($myrow = mysql_fetch_array($res))
	{
             
               echo "<center><table><tr>";
			   echo '<th>'.$myrow['text'].'</th><br /><td>'.date(F." ".d.", ".Y." ".g.":".i.":".sa,$myrow['timesent']).'</td></tr></table>';
			   }
                      
	?>

 

Thats my code and everything works but as soon as i add DESC before limit 5 i get a Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in/home/pkmnx10m/public_html/rpg/_header.php on line 8. How do i fix this?

Link to comment
https://forums.phpfreaks.com/topic/276561-mysql_fetch_array-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.