Jump to content

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resour


Recommended Posts

Why am i getting this error and how can i fix it please help..!!

 

Here are lines 702 and on....

$oldreports=mysql_query("SELECT matchid,challenger,challenged FROM matches WHERE status='Waiting for Scores'");
while(list($matchid,$challenger,$challenged)=mysql_fetch_row($oldreports)){

$getreport=mysql_query("SELECT * FROM match_reports WHERE reporter='$challenger' AND matchid='$matchid'");
$getreport=mysql_fetch_array($getreport);

$getreport2=mysql_query("SELECT * FROM match_reports WHERE reporter='$challenged' AND matchid='$matchid'");
$getreport2=mysql_fetch_array($getreport2);

 

 

I was missing challenged in my table... can anyone tell fropm this code what lines i need in the table challanged....

 

Like for example

 

challangerid varchar 225

 

$oldreports=mysql_query("SELECT matchid,challenger,challenged FROM matches WHERE status='Waiting for Scores'");
while(list($matchid,$challenger,$challenged)=mysql_fetch_row($oldreports)){

$getreport=mysql_query("SELECT * FROM match_reports WHERE reporter='$challenger' AND matchid='$matchid'");
$getreport=mysql_fetch_array($getreport);

$getreport2=mysql_query("SELECT * FROM match_reports WHERE reporter='$challenged' AND matchid='$matchid'");
$getreport2=mysql_fetch_array($getreport2);


if($getreport[reportid] AND !$getreport2[reportid]){

$_updated = strtotime($getreport[reported]);
$time = time();
$diff = $time - $_updated;
$diff = $diff - '60';
if ($diff > 14400){

$getwinner=mysql_query("SELECT * FROM team WHERE teamid='$challenger'");
$getwinner=mysql_fetch_array($getwinner);

$getloser=mysql_query("SELECT * FROM team WHERE teamid='$challenged'");
$getloser=mysql_fetch_array($getloser);

I don't know what you're trying to say here...  I don't see where you're trying to select from the table 'challenger'.

 

Do you mean that the field 'challenger' doesn't exist and you want to change it to 'challengerid'?

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.