Clean-up Queries Where Member Does Not Exist

Clean-up Queries Where Member Does Not Exist:

delete FROM banners

WHERE

NOT EXISTS (

select * from members m

Where banners.userid = m.userid

);

delete FROM buttons

WHERE

NOT EXISTS (

select * from members m

Where buttons.userid = m.userid

);

delete FROM hotlinks

WHERE

NOT EXISTS (

select * from members m

Where hotlinks.userid = m.userid

);

delete FROM loginads

WHERE

NOT EXISTS (

select * from members m

Where loginads.userid = m.userid

);

delete FROM tlinks

WHERE

NOT EXISTS (

select * from members m

Where tlinks.userid = m.userid

);

 

Thanks to Dave Mosher

See Dave’s sites, and the best selection of SuperNetwork bargains anywhere:

>>>>> SimpleTextAdz