MySQLi Delete Record

MySQLi DELETE statement is used to delete existing records in a table.

Below the syntax of DELETE command.

DELETE FROM table_name [WHERE Clause]
<?php
$conn  = mysqli_connect('localhost:3306', 'user_name', 'password', 'db_nexladder');
 if(! $conn) {
     die('Could not connect: ' . mysqli_error());
 }
 $sql = 'DELETE FROM `tbl_customers` WHERE `id` = 1';
 if (mysqli_query($conn, $sql)) {
    echo "Record deleted successfully";
 } else {
    echo "Error deleting record: " . mysqli_error($conn);
 }
 mysqli_close($conn);
?>

Below it'll look like

mysql delete