note 23327 deleted from function.mysql-query by betz

From: Date: Sat, 10 Aug 2002 17:25:16 +0000
Subject: note 23327 deleted from function.mysql-query by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-34773@lists.php.net to get a copy of this message
Since a failed mysql_query does not return an error message, if you're trying to debug and need to know what's going on, use mysql_errno and mysql_error. The documentation for both of those is great with easy to follow examples. In response to sronic22@hotmail.com (posted 19-Jun-2002), I had the same problem. To debug, I did as I recommended above. This showed that I needed mysql_select_db after the connect and before the query. I think you'll find the same thing for yours because the query does not know what database to find the table in; it only knows that it's connected to a database server.

« previous php.notes (#34773) next »