I'm using php with mysql below is a select statement I am using to find the names of members on my site that have not logged in since the date of 2004-12-01 23:14:45. I am using table2 for the reference dates so that I know which members from table1 have not accessed my site since the date indictated. The select statement works fine, but I am having a problem with deleting the selected member names from table1 without deleting them from table2. Any suggestions? Thanks in advance for any help.
select distinct table1.username from table1, table2 where table2.last_login < "2004-12-01 23:14:45" and table1.username = table2.username;