Home  >  Article  >  Backend Development  >  What does mysql_query mean in php?

What does mysql_query mean in php?

青灯夜游
青灯夜游Original
2019-10-19 18:03:155785browse

What does mysql_query mean in php?

mysql_query is a built-in function in PHP that is used to execute a query against the database.

Syntax:

mysqli_query(connection,query,resultmode);

Parameters:

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 a large amount of data)

● MYSQLI_STORE_RESULT (default)

Return value :

For a successful SELECT, SHOW, DESCRIBE or EXPLAIN query, a mysqli_result object will be returned. For other successful queries, TRUE will be returned. On failure, returns FALSE.

Example: Delete database

For more PHP related knowledge, please visit php中文网!

The above is the detailed content of What does mysql_query mean in php?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn