mbrown Posted February 6, 2009 Share Posted February 6, 2009 $result = mysql_query($Query, $db); $WASD = mysql_fetch_assoc($result); Error Messages for the Above Code: Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\seniorProject\administration\showEquipmentData.php on line 141 $numRows = mysql_num_rows($result); if ($numRows <= 0) Gives the following error: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\seniorProject\administration\showEquipmentData.php on line 162 I am going to still mess around and research some to see if ic an find a solution. If anyone else knows what it is please let me know please. Thanks [/code] Link to comment https://forums.phpfreaks.com/topic/144090-solved-supplied-argument-is-not-a-valid-mysql-result-resource/ Share on other sites More sharing options...
gevans Posted February 6, 2009 Share Posted February 6, 2009 change; $result = mysql_query($Query, $db); to; $result = mysql_query($Query, $db) or die(mysql_error().'<br /> the query: '.$Query); Link to comment https://forums.phpfreaks.com/topic/144090-solved-supplied-argument-is-not-a-valid-mysql-result-resource/#findComment-756019 Share on other sites More sharing options...
omfgthezerg Posted February 6, 2009 Share Posted February 6, 2009 This means your query is failing. Check your query: $result = mysql_query($Query, $db) or die(mysql_error()); Link to comment https://forums.phpfreaks.com/topic/144090-solved-supplied-argument-is-not-a-valid-mysql-result-resource/#findComment-756021 Share on other sites More sharing options...
mbrown Posted February 6, 2009 Author Share Posted February 6, 2009 Fixed. Did a combination of what you two said about 5-10 minutes after I posted. All working now. Link to comment https://forums.phpfreaks.com/topic/144090-solved-supplied-argument-is-not-a-valid-mysql-result-resource/#findComment-756031 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.