benoit1980 Posted June 3, 2013 Share Posted June 3, 2013 Hello, I would like to know if someone could tell me by giving me the php command on how to remove user accounts from Table A which are found in Table B? My table B are the unsubscribed users from Mailchimp while table a are the one subscribed from my website. Unfortunately, it is impossible to have the row deleted from Mailchimp in mysql so the only way to do this is to delete the users between the 2 tables... Any idea please? Thank you, Ben Quote Link to comment Share on other sites More sharing options...
Psycho Posted June 3, 2013 Share Posted June 3, 2013 You mean the MySQL query, not the "PHP command", correct? You didn't provide any details of the fields in the two tables or what logic should be used to determine that a record from Table A is the same as a record from Table B. Also, based upon your explanation you are wanting to delete the Subscribed user records and leave the un-susbscribed user records - that seems backwards, But, generically speaking, let's say the email address is used to determine that the user records are the same DELETE FROM table_a WHERE user_email IN ( SELECT user_email FROM table_b ) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.