Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the php mysql statement to delete the database?

Shulou Source: shulou.com Published: 2022-06-03 10:48:20 10月13日 Update

This article shows you how the php mysql delete database statement is, the content is concise and easy to understand, absolutely can make your eyes bright, through the detailed introduction of this article, I hope you can get something.

Php mysql delete database statement is "DROP DATABASE", its specific deletion method is: 1, through the mysqli_connect function to connect mysql;2, through the "DROP DATABASE" statement and "mysqli_query" function to delete the database.

This article operating environment: windows7 system, PHP7.1 version, Dell G3 computer.

What is the statement that php mysql deletes the database?

PHP uses the mysqli_query function to create or delete an MySQL database.

This function takes two arguments and returns TRUE on successful execution, or FALSE otherwise.

Grammar

Mysqli_query (connection,query,resultmode)

Parameters.

Connection is required. Specifies the MySQL connection to be used.

Query is required, specifying the query string.

Resultmode

Optional. A constant. It 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)

Example

The following example demonstrates the use of the PHP mysqli_query function to delete a database:

Delete database

After a successful execution

Note: when using the PHP script to delete the database, it will not confirm whether to delete the information, but will delete the specified database directly, so you should be very careful when deleting the database.

The above is what the php mysql delete database statement is like, have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Tags: Data database statement function success content parameter instance skill user user name knowledge concise concise two host information address character string Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Shulou Information Huawei Shulou Technology vpn