Hi there, I need some help with this error/warning
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource
here is the code:
include "connect.php";
include "comment.class.php";
$result = mysql_query("select * from comments order by id");
$comments = array();
while($row = mysql_fetch_assoc($result))
{
$comments[] = new Comment($row);
}
?>
i connected the database it is named comments and had a column id. cant think what's the problem with my code. at connect.php I set the connection for the mysqldatabase. can you point out what's the problem here? thanks