|
You do it just like a SELECT query, but use DELETE instead. Lets say you have a table that stores letters, and a field called 'bseen', that is a tinyint, and is set to 0 if the letter has not been seen, or a positive number if the letter has been seen. To delete all letters that have been seen, we just do;
mysql_query("DELETE FROM mail_table WHERE bseen>0", $db);
Just like a SELECT, but if we want to delete the whole field, we leave out the asterisk (*). To explain further; if I wanted to SELECT all the letters that have been seen, I would just do;
mysql_query("SELECT * FROM mail_table WHERE bseen>0",$db);
__________________
Theres 10 types of people; those who understand binary, and those who don't.
webmaster and webdeveloper resources, Please login or register to view this content. Registration is FREE
|