Forum Moderators: coopster
$today=time();
the pseudo code for what I wish to do is this..
if DATE LEFT = 3 MONTHS AGO
{
DELETE USER FROM DATABASE
} what is the code for "DATE LEFT = 3 MONTHS AGO "?
OR
rathar than use the IF statement could i simply add it to the DELETE query?
ie. DELETE USER FROM DB WHERE DATELEFT = 3 MONTHS AGO?
Can anybody help?
Thankyou
DELETE FROM users WHERE date_left<NOW() - INTERVAL '3 months'";
should be similar in MySQL ;)