I'm writing this utterly simple script and it keeps crashing on the first mysql query it encounters. Now the server I am developing on is known to be quite a mess. So I'm wondering if i't's the server or me because I can't see what's wrong.
Here's the query:
$sql= "SELECT* FROM linkbox_cats WHERE table = '1'";
$output = mysql_query($sql) or die(mysql_error());
$row = mysql_fetch_array($output);
while($row = mysql_fetch_array($output))
{
(stuff here)
}
when the script dies(), mysql_error() screams: You have an error in your SQL syntax near 'table = '1'' at line 1
There is a database connection and the table 'linkbox_cats' as well as the field 'table' exist.
I can't see it? Can you?