dprincejay Posted May 6, 2013 Share Posted May 6, 2013 Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\Program Files\Ampps\www\myphpschool\main.inc.php on line 277 pasted below is the line 277 code while( $myrow = mysql_fetch_array($result)){ $url = $myrow["url"]; $name = $myrow["name"]; $min_lvl = $myrow["min_ulvl"]; $max_lvl = $myrow["max_ulvl"]; if($u_lvl >= $min_lvl && $u_lvl < $max_lvl){ Thaks Link to comment https://forums.phpfreaks.com/topic/277695-need-help-with-this-code/ Share on other sites More sharing options...
denno020 Posted May 6, 2013 Share Posted May 6, 2013 Looks like your query failed and $result is in fact false (which is a boolean). On the line before while(), do a var_dump of $result to see what it is. I suspect it will show false, which means you need to check your query. Link to comment https://forums.phpfreaks.com/topic/277695-need-help-with-this-code/#findComment-1428569 Share on other sites More sharing options...
Barand Posted May 6, 2013 Share Posted May 6, 2013 echo mysql_error() to find out why your query failed Link to comment https://forums.phpfreaks.com/topic/277695-need-help-with-this-code/#findComment-1428579 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.