Hi, I have a DB which include a Table “users†which have fields userID userUsername userPassword userFirstName userLastName userEmailAddress userLastAccountAccess userDateRegistered userStatus userPrivliges userAccountType userAddressStreet userAddressZIPCode userAddressCity userAddressState userDateOfBirth userGender userPublicProfile userCreditBalance userReferralID I have a Text file with a list of bad emails one email per line I need a Simple script that I can insert db name , un and pw and upload and run to remove all user’s who have email matching one in the bad email list. I am trying to clean my newsletter of bad email users, bonusback or unsubscribers etc. Any help is appreciated
ok, not sure what format your bad list is in, but for each row in bad list, define the bad address as $bad, simply use following php query - EXAMPLE ONLY, will need tweaking, and will also need your db connection establishing before this is declared in your script.
I always find out some solution DELETE FROM users WHERE (userEmailAddress='p*****@aol.com'); I just have to repeat this 4 - 500 times for each mail
don't need the () around useremail, this would work just as well DELETE * FROM users WHERE userEmailAddress='blahblah@gmail.com';