note 7865 added to mysql_db_query
| From: | matt at ecosandals dot com | Date: | Thu, 17 Aug 2000 18:38:03 +0000 |
| Subject: | note 7865 added to mysql_db_query | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-2210@lists.php.net to get a copy of this message | ||
I too spent a ridiculous amount of time making mysql_db_query() functional. The three tricks that
got me out of the pickle were:
1) Use "localhost" as db parameter for mysql_connect() but "database_name" as db
parameter for mysql_db_query().
2) Put your query string in a variable and send the variable as your second parameter.
3) The result from mysql_connect() is the third parameter for mysql_db_query().
Code samples below were helpful.
http://www.php.net/manual/function.mysql-db-query.php