Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the php mysql statement to delete the database?

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report