Jump to content
MakeWebGames

MCC V1 Jail Problem


iR00T

Recommended Posts

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 ..........?

Link to comment
Share on other sites

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)
{
Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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.

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.

×
×
  • Create New...