Jump to content

Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result res


lengman

Recommended Posts

Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/igweeccr/public_html/includes/functions.php on line 239

 

 

The line is: while($tard_bar=mysql_fetch_object($drop_bar)){

 

The code is:

$drop =mysql_query("SELECT * FROM casinos");

 

while($tard=mysql_fetch_object($drop)){

$per = mysql_fetch_object(mysql_query("SELECT * FROM users WHERE username='$tard->owner'"));

if ($per->status == "Dead" || $per->status == "Banned"){

mysql_query("UPDATE casinos SET owner='0' WHERE casino='$tard->casino' AND owner='$tard->owner'");

}

 

}

$drop_bar =mysql_query("SELECT * FROM bar");

 

while($tard_bar=mysql_fetch_object($drop_bar)){

$per_bar = mysql_fetch_object(mysql_query("SELECT * FROM users WHERE username='$tard_bar->owner'"));

if ($per_bar->status == "Dead" || $per_bar->status == "Banned"){

mysql_query("UPDATE bar SET owner='0' WHERE owner='$tard_bar->owner'");

}

 

}

$drop_crew =mysql_query("SELECT * FROM crews");

 

while($tard_crew=mysql_fetch_object($drop_crew)){

$per_crew = mysql_fetch_object(mysql_query("SELECT * FROM users WHERE username='$tard_crew->owner'"));

if ($per_bar->status == "Dead" || $per_bar->status == "Banned"){

mysql_query("UPDATE crew SET owner='$tard_bar->rhm', rhm=''  WHERE owner='$tard_bar->owner'");

}

 

Can anyone see a problem with this? I'm pretty new to php and mysql, but I can't find the problem with it. Any help would be greatly appreciated.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.