Jump to content
MakeWebGames

mysql_result() expects parameter 1 to be resource, boolean given


bloodless2010
 Share

Recommended Posts

Okay, In my gym I get a few of these...

Warning: mysql_result() expects parameter 1 to be resource, boolean given in /var/www/global_func.php on line 269

The line 269 is part of this function:

function get_rank($stat, $mykey)
{
   global $ir, $userid, $c;
   $q = mysql_query("SELECT count(*) FROM userstats us LEFT JOIN users u ON us.userid=u.userid WHERE us.$mykey > $stat AND us.userid != $userid AND u.user_level != 0",$c);
   return mysql_result($q, 0, 0) + 1;
}
Link to comment
Share on other sites

Sorry Illusions :l

The error is on global_func though.

It's the function that returns the rank, it does work, but it still returns the WARNING.

I can just make the WARNINGS go away, but I don't want to do that because I feel like it's the lazy way out, I want to remove the actual thing, I'm just looking for help, I did look at that link you sent me and tried to re-do the function but I had no luck.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...