Forum Moderators: coopster
Warning: Supplied argument is not a valid MySQL result resource in blahblah/prototype/mysql.php3 on line 59.
Line 58-60 :
if( (!$results) or (empty($results)) ) {
mysql_free_result($results);
return false;
Is there an issue with versions of apache or something else.
Cheers and thanks in advance
Is the value for $results working properly? Are you worried about taking too much memory?
The comparison itself seems flawed. If there are no results, free the memory $results is using. That is backwards. I would be more likely to think that if there are results then free them.
It looks like you are generating a mysql error because you are trying to free an empty variable. I would look at the logic of that area of code.
Use the "or die" command to have it output the query string. Then you can see what's happening and why the query is invalid. If it isn't immediately obvious, keep tweaking it and running it in the SQL client (shell, PhpMyAdmin, Mysql-Front or whatever you're using).
Tom