This is pretty easy but also very dangerous.  Do not try this query:


This will delete all records from the table first.  What you need to do is to tell it which records to delete very carefully.  Open your PHP template and save it as sqldelete.php.  Remember that any time you load this page in a browser it will try to delete stuff!

Put this line of code inside the PHP block:

mysqli_query($dbconnection, "DELETE FROM first WHERE familyName='Smith' LIMIT 1;") or die("Error deleting: ".mysqli_error($dbconnection));

Save and upload.  When you load the page it will delete the row in the table which matches (which is probably none).  Change Smith to a name which exists in your table (Bloggs?) and load the page again.  Use sqllist.php to confirm deletion and if you had Fred Bloggs twice in your table he should now only be there once.  LIMIT 1 means this query will only ever delete one record.  This is useful because then when you make a mistake with your delete query (and you will) you do not delete all the rows of data by mistake.  You still lose one but hopefully that will not be such a big problem.  Obviously if you wanted to delete all matching records you would remove the LIMIT.