PHP – Delete Data from MySQL database

The given PHP example helps you to delete the data from MySQL database against a specific Id.

Code Example:
$query = "DELETE FROM tablename WHERE id = ('$id')";
$result = mysql_query($query);
echo "The data has been deleted.";

Post to Twitter Post to Digg Post to Facebook Post to Google Buzz Send Gmail

Leave a Comment

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