PHP mysqli_query() Function
Execute a query against the database:
Query the database
Definition and Usage
The mysqli_query() function executes a query against the database.
Syntax
mysqli_query(
connection,query,resultmode
)
;
| Parameters | Description |
|---|---|
| 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: |
Technical Details
| Return Value: | For a successful SELECT, SHOW, DESCRIBE or EXPLAIN query, a mysqli_result object is returned. For other successful queries, TRUE is returned. If it fails, FALSE is returned. |
|---|---|
| PHP Version: | 5+ |
| Changelog: | The asynchronous query capability was added in PHP 5.3.0. |
PHP MySQLi Reference Manual