Jump to content

[SOLVED] PHP Variable in MySQL Query Problem


Immaterial

Recommended Posts

This code is giving me an error:

 

(Line 54) $info = mysql_query("SELECT * FROM war3 WHERE Replay# <= " . $first . " order by Replay# desc");
(Line 55) $data = mysql_fetch_array($info);

 

$first is an integer variable. I have echoed it to test it, and in this particular case, it is "1". This is the error I am getting: "Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in W:\www\Files\replays.php on line 55"

 

The code is supposed to pull all entries from the table 'war3' that have  Replay# of less than/equal to $first. I am unsure which version of MySQL I am using; it is the one that comes with the latest version of Uniform Server.

 

Thank you for your assistance!

 

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.