Bladephp: Now with 7+ codeigniter, php, and laravel project 7+ php project From $18/Year From Rs. 1000/Year

Mysql DELETE Query

by
Category:mysql
php mysql
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!!';
}

0 Comments


Html code work in comment box


Related Post