I have a list of invalid email addresses parsed in the following format;
There are roughly 1500 invalid addresses, and I need to remove them from my myBB users.
What SQL query can I run to remove the list from my database?
In case of you are having a list of the mail adresses maybe like that 'firstname.lastname@example.org', 'email@example.com' etc... you could do a simple
This might not be the best solution, but the easiest to undersand IMHO ;) However, be careful as delete means delete in most cases as in data are gone. Also not how your application handles deleting users like that.
If you have a main table like this
You can built the table that contains the ids of the users with bad email addresses
Look over the content of
Before you do this, make sure you have a backup of the table.
In your case, the code will be
Give it a Try !!!