query handle mysql_query(string query, [mysql link connection]) 
query Query to use on the database
connection Connection handle returned by mysql_connect() or mysql_pconnect()

Queries the default MySQL database.


Query handle for successful SELECT queries, TRUE/FALSE for other queries; FALSE on error


mysql_query() executes query on the default database, set using mysql_select_db() or by a previous query using mysql_db_query(), on the MySQL server connection referenced by connection . If no connection handle is specified in the connection argument, the last connection opened is used by default. If no connection is open, mysql_query() attempts to connect to a MySQL database by calling mysql_connect() without ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.