iR00T Posted June 24, 2008 Share Posted June 24, 2008 Ok listen i got a problem with my MCC v1 jail not lite v1 this is the error Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/my cpanel login name/public_html/jail.php on line 24 noiw this is lines 23-25 $q=mysql_query("SELECT u.*,c.* FROM users u LEFT JOIN gangs c ON u.gang=c.gangID WHERE u.prison > 0 ORDER BY u.prison DESC", $c); if(mysql_num_rows($q) == 0) { does anyone know what that error is ..........? Quote Link to comment Share on other sites More sharing options...
AlabamaHit Posted June 24, 2008 Share Posted June 24, 2008 Re: MCC V1 Jail Problem im not very familiar with v1 but this looks odd u.prison maybe it should be u.jail? so it would be $q = mysql_query("SELECT u.*,c.* FROM users us LEFT JOIN gangs c ON u.gang=c.gangID WHERE u.jail > 0 ORDER BY u.jail DESC", $c); if(mysql_num_rows($q) == 0) { Quote Link to comment Share on other sites More sharing options...
Joel Posted June 24, 2008 Share Posted June 24, 2008 Re: MCC V1 Jail Problem Try and Replace Prison with Jail Quote Link to comment Share on other sites More sharing options...
Exemption Posted July 3, 2008 Share Posted July 3, 2008 Re: MCC V1 Jail Problem Lol The most simplest things. Quote Link to comment Share on other sites More sharing options...
Ishy Posted July 9, 2008 Share Posted July 9, 2008 Re: MCC V1 Jail Problem Hmm..I hate adding two SQL's into one so I would code it the simpler way: $UserSelectQuery="SELECT * FROM users WHERE jail > 0"; $UserSelectResult=mysql_query($UserSelectQuery); $UserCount=mysql_num_rows($UserSelectResult); if ($UserCount > 0) { I hope that this code works. Toxication Quote Link to comment Share on other sites More sharing options...
AlabamaHit Posted July 9, 2008 Share Posted July 9, 2008 Re: MCC V1 Jail Problem The combination is to show the Gang they user is in and the User...that code you made wont do it... Quote Link to comment Share on other sites More sharing options...
iR00T Posted July 11, 2008 Author Share Posted July 11, 2008 Re: MCC V1 Jail Problem oh well i still havent figured it out could someon give me a code that would work idc if its standard as long as it works lol Quote Link to comment Share on other sites More sharing options...
Lithium Posted July 16, 2008 Share Posted July 16, 2008 Re: MCC V1 Jail Problem oh well i still havent figured it out could someon give me a code that would work idc if its standard as long as it works lol Hi, for the codebit you pasted it is not possible to figure out where it might be the issue, as you have resources running within the if statement the error triggers on line 24 though it can be on any line below that one within the if statement, so if you can paste the if until the closing bracket :) Quote Link to comment Share on other sites More sharing options...
Floydian Posted July 16, 2008 Share Posted July 16, 2008 Re: MCC V1 Jail Problem Go into PHP MyAdmin and run that query. SELECT u.*,c.* FROM users u LEFT JOIN gangs c ON u.gang=c.gangID WHERE u.prison > 0 ORDER BY u.prison DESC See what comes up there. If you see some sort of error, post back here with exactly what that error is. Quote Link to comment Share on other sites More sharing options...
iR00T Posted July 17, 2008 Author Share Posted July 17, 2008 Re: MCC V1 Jail Problem MySQL said: Documentation #1054 - Unknown column 'u.prison' in 'where clause' 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.