How do I delete a row from a table?
And unlike recycle bins and dodgy deletion of data on PCs, when you DELETE it is gone!
Here is how you do it:
<?php
$query = "DELETE from mytable";
//when you run that, it's gone!
//notice that you DON'T do this
$query = "DELETE * FROM mytable";//error!
?>
Comment on this Question and Answer >>>
ASK A QUESTION
More mysql PHP Questions
What is difference between mysql_fetch_array and mysql_fetch_object?how do i upload an image to database?
How do I insert the date into my table?
the code is running well without errors but y is it that three of the columns in the table do not insert data?
How do I update the contents of a table row?
