Jump to content

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, string given in


visionaire

Recommended Posts

I have a strange error from the code below. I have run the query with the resulting values in PHPMyAdmin and it works fine.

 

The code is:

$query = "SELECT * FROM sn_matches WHERE (P1_ID='".$P1_ID."' AND P2_ID='".$P2_ID."') OR (P1_ID='".$P2_ID."' AND P2_ID='".$P1_ID."')";
while($row = mysql_fetch_assoc($query)){

 

The error is:

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, string given in /customers/ronflorax.com/ronflorax.com/httpd.www/snookerstats/h2h.php on line 21

 

Line 21 is the one which has mysql_fetch_assoc on it.

 

Any help would be much 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.