php Mysql DELETE Query

If you want to delete a record from any MySQL table, then you can use the SQL command DELETE FROM.

To understand Delete query, consider an Customers table, which is having following query

First you can need database connection in php

Code

$querydelte = mysqli_query($con,"DELETE FROM Customers WHERE id='1' "); 
if($querydelte)
{
    $message = 'Zone Deleted Successfully!!';
}
else
{
    $message = 'Due to some Error Please try again!!';
}

Leave a Reply

Your email address will not be published. Required fields are marked *