Execute a query against the database:
The mysqli_query() function executes a query against the database.
mysqli_query( connection,query,resultmode ) ;
parameter | describe |
---|---|
connection | Required. Specifies the MySQL connection to use. |
query | Required, specifies the query string. |
resultmode | Optional. a constant. Can be any of the following values: MYSQLI_USE_RESULT (use this if you need to retrieve large amounts of data) MYSQLI_STORE_RESULT (default) |
Return value: | For a successful SELECT, SHOW, DESCRIBE, or EXPLAIN query, a mysqli_result object is returned. For other successful queries, TRUE will be returned. If it fails, returns FALSE. |
---|---|
PHP version: | 5+ |
Update log: | The asynchronous query function is added in PHP 5.3.0. |