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
How do I find the ID of a new row added to a table?How do I order the results of my query?
How do I update the contents of a table row?
How do I find the number of rows affected by a query?
how to write sessions in php code?
