PHP MySQL Delete
The DELETE FROM
statement is used to delete rows from a database table.
The following example creates and populates a Members
table using the following SQL commands:
CREATE TABLE Members (
ID INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(16) NOT NULL );
INSERT INTO Members( name ) VALUES( '$name1' );
|
and deletes the items using:
DELETE FROM Members WHERE name LIKE '%$name2%';
|
Two fish are sitting in a tank.
One looks over at the other and says:
“Hey, do you know how to drive this thing?”
|