From what I have seen in the response you have left in the comments to what you mean by deleting query is to delete a record from the database.
I recommend that you change the title of your question and be careful with the terms you use in future consultations.
To delete a record with PHP you just have to execute a DELETE FROM query and control the errors.
<?php
$servername = "127.0.0.1";
$username = "root";
$password = "";
$dbname = "tiendita";
// Creación de la conexión
$conexion = new mysqli($servername, $username, $password, $dbname);
// Se comprueba la conexión realizada.
if ($conn->connect_error) {
die("Error en la conexión: " . $conn->connect_error);
}
// Consulta para borrar el dato que queramos.
$sql = "DELETE FROM clientes WHERE id_cliente=1";
//Ejecutamos la consulta y comprobamos que se haya completado correctamente.
if ($conn->query($sql) === TRUE) {
echo "Registro borrado correctamente.";
} else {
echo "Error al borrar el registro: " . $conn->error;
}
//Al acabar se cierra la conexión.
$conn->close();
?>
In the query $sql = "DELETE FROM clientes WHERE id_cliente=1";
you would have to create your own query to delete the record or records depending on the value you want. If you want to be able to choose in some way the client id to be deleted from the application, you would have to change the id_cliente=1
for some variable type id_cliente=$idBorrar
and recover it from a $ _POST or similar.