pacitto513 Posted June 2, 2012 Share Posted June 2, 2012 Hey everyone, I have been running my code over and over again making various changes tryingto solve this error, however nothing has worked. The following error keeps ocurring: Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\Website-1.0\root\home.php on line 11 The following line(s) this error is referring to are as followed: $sql_user_data = mysql_query("SELECT id, username, fullname, city, posts FROM members WHERE id='$userid' LIMIT 1"); while($row = mysql_fetch_array($sql_user_data)){ Does anyone know how to fix this error?? Thanks. Link to comment https://forums.phpfreaks.com/topic/263519-help/ Share on other sites More sharing options...
Pikachu2000 Posted June 2, 2012 Share Posted June 2, 2012 Your query is failing and returning a boolean FALSE. mysql_error should help you determine the reason for the failure. Link to comment https://forums.phpfreaks.com/topic/263519-help/#findComment-1350479 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.