I have two tables pluserdata and pluserlids. pluserdata contains all the users information such as ID username password email etc, and pluserlids contains just corresonding IDs (from pluserdata) and then leagueid which correspods to another table.
What I am after is a query to look at pluserlids and then delete any rows that do not have a corresonding id in pluserdata.
Another way of explaining it is that I have deleted about 1000 users (spam) from pluserdata but their ids are still in the pluserlids table so I want to check to see if they have been deleted then to remove their lid from pluserlids.
EDIT: oh and I'm using MySQL 4.0.20