Now, why doesn't this work?

From: Date: Tue, 24 Apr 2001 02:20:00 +0000
Subject: Now, why doesn't this work?
Groups: php.general 
Request: Send a blank email to php-general+get-49989@lists.php.net to get a copy of this message
Hello everybody, My host seems to be having some weird problems. Here's a piece of code: if (($this_month_sql = mysql_query("SELECT * FROM $mysql_shows_table WHERE month = '$thismonth' ORDER BY timestamp ASC")) && ($next_month_sql = mysql_query("SELECT * FROM $mysql_shows_table WHERE month = '$nextmonth' ORDER BY timestamp ASC"))) { do this(); } else { print ("<font face=Arial size=2>MySQL query <b>DIDN'T RETURN DATA</b><br>Error No.:". mysql_errno(). "<br>MySQL Error:". mysql_error(). "</font><Br>"); } Now, this is the error that I get from this: MySQL query DIDN'T RETURN DATA Error No.:1064 MySQL Error:You have an error in your SQL syntax near 'WHERE month = '4' ORDER BY timestamp ASC' at line 1 Why I get this, I don't know. The code hasn't changed in a few days, and it just started doing that today. This also works on my home Win2k box, and Slackware box. The versions of PHP, MySQL, and apache are the same on my host and on my Linux box. The version of php and mysql are the same on ALL of the machines (host, Win2k, Slackware). Any ideas? Thanks everyone, Tyler

« previous php.general (#49989) next »