Blog Tutorial mysql_fetch_assoc() Error
Posted: Tue May 24, 2011 10:12 pm
Hi
Ref:http://www.youtube.com/user/betterphp#p ... jcZ1_kO_tA
blog tutorial
I did got this working by putting an ( if statment in but it will not work now so I took it out ) and its still giving me the same problem as I first had. error:-
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in ---posts.inc.php on line 41
Any ideas what I can do to resolve this thanks.
I have this as lines 38 - 42
Ref:http://www.youtube.com/user/betterphp#p ... jcZ1_kO_tA
blog tutorial
I did got this working by putting an ( if statment in but it will not work now so I took it out ) and its still giving me the same problem as I first had. error:-
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in ---posts.inc.php on line 41
Any ideas what I can do to resolve this thanks.
I have this as lines 38 - 42
$posts = mysql_query($sql); $rows = array(); while (($row = mysql_fetch_assoc($posts)) !== false){ $rows[] = array(Hope you can help.