It means that the result resource returned by mysql_query() is FALSE, indicating an error with your query.
Use mysql_error() to get the error returned by MySQL.
http://www.php.net/mysql_error
You should perform validity checking after each step involving a connection to another server/service, such as a database. At it's simplest, this is:
mysql_connect(...) or die("Couldn't connect: " . mysql_error());
mysql_select_db(...) or die("Couldn't select DB: " . mysql_error());
mysql_query(...) or die("Query failed: " . mysql_error());
Take care,
Nik
http://www.bigaction.org/