note 23327 added to function.mysql-query

From: Date: Mon, 15 Jul 2002 17:18:43 +0000
Subject: note 23327 added to function.mysql-query
Groups: php.notes 
Request: Send a blank email to php-notes+get-33095@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. -- http://www.php.net/manual/en/function.mysql-query.php http://master.php.net/manage/user-notes.php?action=edit+23327 http://master.php.net/manage/user-notes.php?action=delete+23327 http://master.php.net/manage/user-notes.php?action=reject+23327

« previous php.notes (#33095) next »