Immaterial Posted April 14, 2007 Share Posted April 14, 2007 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! Link to comment https://forums.phpfreaks.com/topic/46947-solved-php-variable-in-mysql-query-problem/ Share on other sites More sharing options...
bubblegum.anarchy Posted April 14, 2007 Share Posted April 14, 2007 `#` is a comment character. Link to comment https://forums.phpfreaks.com/topic/46947-solved-php-variable-in-mysql-query-problem/#findComment-228968 Share on other sites More sharing options...
Immaterial Posted April 14, 2007 Author Share Posted April 14, 2007 Haha, wow, I feel sorta dumb... Thanks for the help, man. Link to comment https://forums.phpfreaks.com/topic/46947-solved-php-variable-in-mysql-query-problem/#findComment-228982 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.