Notes On How To Fix Mysql_fetch_assoc Expects Parameter 1 To Be A Resource Error
Table of Contents
Don’t suffer from Windows errors anymore.
If mysql_fetch_assoc expects parameter 1 to be a resource error message on your machine, you should review these troubleshooting suggestions.
You really don’t need to prevent this email error!
Bug reporting friends!
Without your error warnings, you would never know what might happen.
it is any running code that should generate error messages. error
though messages should be handled properly.Usually buyers don’t need to take any special steps to avoid these excellent error messages. Your only law on vacation is unchanged.But if you don’t want that error message to be found by the user, you just need to enable it. Not an error message, passing but to its user. .
ini_set('display_errors',0);ini_set('log_errors',1);
or .even .better .at ..htaccess/php.ini
And employees will never see bugs about tweets. While you’re sure, check the problem log again.
Note that error_reporting should take precedence in both cases.
To avoid this important message, make sure mysql_query production and fetch_assoc are working properly. usually
But no one uses it becausethis type of requirement may require a stacked set of “ifs”.
But there may be solutions – exceptions! But
what you don’t need yet. You can leave your code as is if you want it to work without errors. return
Using them is another way to avoid nested error messages. Here’s a snippet of my list-management function:
$res means that if mysql_query($query); (!$res) trigger_error("dbget: ".mysql_error()." in ".$query); return false; if (!mysql_num_rows($res)) returns NULL; // Go here // if there were no errors so far