$query = $conn -> query("DELETE FROM table_name WHERE some_column = some_value");
if ($query){
echo "success";
}
<?php
$servername = "localhost";
$username = "username";
$password = "password";
$dbname = "myDB";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
// sql to delete a record
$sql = "DELETE FROM MyGuests WHERE id=3";
if ($conn->query($sql) === TRUE) {
echo "Record deleted successfully";
} else {
echo "Error deleting record: " . $conn->error;
}
$conn->close();
?>
Code Example |
---|
Php :: laravel unsigned integer |
Php :: install php 7.3 ubuntu |
Php :: laravel 8 validation required if another field is not null |
Php :: set names utf8 |
Php :: download file php |
Php :: yii2 set cookie |
Php :: php return json data to ajax |
Php :: show data from a table in laravel 8 |
Php :: Laravel 5.4 Route back in blade |
Php :: PHP Function to create GUID |
Php :: ajax get request in laravel |
Php :: laravel run schedule locally |
Php :: var_dump php |
Php :: laravel multiple orderby |
Php :: php.ini location |
Php :: laravel duplicate row |
Php :: Fetch Data From Database With PDO |
Php :: laravel socialite |
Php :: laravel-medialibrary packagist |
Php :: string convert snake case to title case in laravel |
Php :: define in php |
Php :: laravel validation regex |
Php :: run seeder in migration laravel |
Php :: php save array in mysql database |
Php :: laravel blade empty |
Php :: laravel folder permission |
Php :: replace in php |
Php :: php ternary |
Php :: full month name php |
Php :: adding days in datetime php |