mysql_db_query Selects a database and executes a query on it &mysql.alternative.note.5-3-0; mysqli_select_db then the query PDO::__construct &reftitle.description; resourceboolmysql_db_query stringdatabase stringquery resourcelink_identifierNULL mysql_db_query selects a database, and executes a query on it. &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.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