Twango Posted September 12, 2011 Share Posted September 12, 2011 function hasP($idx, $u){$dhas = mysql_query("SELECT * FROM hpowerups WHERE id = '$idx'");$dhas = mysql_fetch_array($dhas);$dhas = $dhas['has'];if ($dhas == "yes"){return $dhas;}else{return "no";}} Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/appattac/public_html/aadimensions/homepage.php on line 21 Link to comment Share on other sites More sharing options...
Ingolme Posted September 12, 2011 Share Posted September 12, 2011 That means that the mysql_query() returned an error.Put error handling: $dhas = mysql_query("SELECT * FROM hpowerups WHERE id = '$idx'"); if(!$dhas) { echo mysql_error(); exit;}$dhas = mysql_fetch_array($dhas);$dhas = $dhas['has']; Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.