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 return the date with mySQL?How do I return a random row from the database?
How do I update the contents of a table row?
How do I group the results of a mysql query?
I am extracting data from a MySQL Database of which one of the data stored is seperated by a comma. For example, step1,go here,step 2,go there,step 3,go back etc etc. I want to know how to split the data at the comma and format it in html. Using the split
