bloodless2010 Posted November 21, 2012 Share Posted November 21, 2012 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; } Quote Link to comment Share on other sites More sharing options...
sniko Posted November 21, 2012 Share Posted November 21, 2012 Try running the query using phpmyadmin, to see if it returns a result Quote Link to comment Share on other sites More sharing options...
Uridium Posted November 21, 2012 Share Posted November 21, 2012 Bloodless PLEASE try using the search feature on this forum before asking for help the solution to your problem could be found elsewhere....... Quote Link to comment Share on other sites More sharing options...
bloodless2010 Posted November 21, 2012 Author Share Posted November 21, 2012 I already tried illusions, whenever I search it always returns irrelevant threads. Quote Link to comment Share on other sites More sharing options...
Uridium Posted November 21, 2012 Share Posted November 21, 2012 http://makewebgames.io/showthread.php/35995-Gang-Replacement?p=237066&viewfull=1#post237066 Quote Link to comment Share on other sites More sharing options...
Uridium Posted November 21, 2012 Share Posted November 21, 2012 Just because an error points to global_func doesnt always mean the error lies on that page firstly check your gym too make sure the error isnt on that one... Quote Link to comment Share on other sites More sharing options...
bloodless2010 Posted November 22, 2012 Author Share Posted November 22, 2012 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.