MySQL Forums
Forum List  »  PHP

Re: mysql_num_rows(): supplied argument is not a valid MySQL result
Posted by: Peter Brawley
Date: May 14, 2012 10:20AM

> Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource ...

That means the mysql_query() call failed with an error, and the code calling it failed to handle the error. You'll have to find that call, and correct the code to handle the error, minimally ...

$result = mysql_query(...) or exit( mysql_error() )

or a more elaborate scheme using try ... catch.

PB

Options: ReplyQuote


Subject
Written By
Posted
Re: mysql_num_rows(): supplied argument is not a valid MySQL result
May 14, 2012 10:20AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.