My question is how to remove the error, message saying
mysql_fetch_object(): supplied argument is not a valid MySQL result.
I need to throw/catch this error, but not sure how to do this.
When this function has a result to return, it works properly.
It is just that when when the result returns null, it says supplied argument is not a valid mysql result.
So how do I remove this error, so when it doesn't have anything to return, instead of displaying mysql_fetch_object(): supplied argument is not a valid MySQL result
, it shows the user what I want.
$posts = show_allgroupsposts1($myusers,5);
if (count($posts)){
do a bunch of stuff.
}else{
nothing to display.
}
?>
currently, it returns:
mysql_fetch_object(): supplied argument is not a valid MySQL result
nothing to display.