mysql_db_query Selects a database and executes a query on it &mysql.alternative.note; mysqli_select_db then the query PDO::__construct &reftitle.description; resourcemysql_db_query stringdatabase stringquery resourcelink_identifierNULL mysql_db_query selects a database, and executes a query on it. &warn.deprecated.function-5-3-0.removed-6-0-0; &reftitle.parameters; database The name of the database that will be selected. query The MySQL query. Data inside the query should be properly escaped. &mysql.linkid.description; &reftitle.returnvalues; Returns a positive MySQL result resource to the query result, or &false; on error. The function also returns &true;/&false; for INSERT/UPDATE/DELETE queries to indicate success/failure. &reftitle.changelog; &Version; &Description; 5.3.0 This function now throws an E_DEPRECATED notice. 4.0.6 This function is deprecated, do not use this function. Use mysql_select_db and mysql_query instead. &reftitle.examples; <function>mysql_db_query</function> alternative example ]]> &reftitle.notes; Be aware that this function does NOT switch back to the database you were connected before. In other words, you can't use this function to temporarily run a sql query on another database, you would have to manually switch back. Users are strongly encouraged to use the database.table syntax in their sql queries or mysql_select_db instead of this function. &reftitle.seealso; mysql_query mysql_select_db