Jump to content

[SOLVED] can someone help me with one line of php???? PLEASE


skippa

Recommended Posts

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/thebestj/public_html/poker.php on line 1097

 

heres line 1097

 

return mysql_fetch_array(mysql_query("SELECT p.*, u.poker, u.money FROM poker p left join users u on (u.username='{$_SESSION['username']}') WHERE p.id=u.poker"));

 

 

whats wrong with it.

Add this in and see what it outputs:

 

   return mysql_fetch_array(mysql_query("SELECT p.*, u.poker, u.money FROM poker p left join users u on (u.username='{$_SESSION['username']}') WHERE p.id=u.poker") or die(mysql_error()));

Most likely the query fails. Change this one line into three

$sql = "SELECT p.*, u.poker, u.money FROM poker p left join users u on (u.username='{$_SESSION['username']}') WHERE p.id=u.poker";
$result = mysql_query($sql) or die(mysql_error()." $sql");
return mysql_fetch_array($result);

 

this should display what causes the error

Unknown column 'u.poker' in 'field list' SELECT p.*, u.poker, u.money FROM poker p left join users u on (u.username='Chris') WHERE p.id=u.poker

 

Thats The Problem. 

 

Has Anyone Got Msn Where I Can Have A Chat To And They Can Have A Good Look At The Script.?

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.