Home >Backend Development >PHP Problem >How to write delete statement in php

How to write delete statement in php

藏色散人
藏色散人Original
2020-08-11 09:27:342713browse

php delete statement refers to the DELETE statement. The DELETE statement is used to delete rows from the database table, and the DELETE FROM statement is used to delete records from the database table. Its syntax is "DELETE FROM table_nameWHERE some_column=some".

How to write delete statement in php

Recommended: "PHP Video Tutorial"

PHP MySQL Delete

DELETE statement is used to delete rows from a database table.

Delete data in the database

The DELETE FROM statement is used to delete records from the database table.

Syntax

DELETE FROM table_nameWHERE some_column = some_value

Note: Please note the WHERE clause in DELETE syntax. The WHERE clause specifies which records need to be deleted. If you want to omit the WHERE clause, all records will be deleted!

In order for PHP to execute the above statement, we must use the mysqli_query() function. This function is used to send a query or command to the MySQL connection.

The above is the detailed content of How to write delete statement 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