I was wondering if someone could help me
I have two tables 1) profile 2) mailbox_conversation
Each table has a common column called profile_id
I would like to find all the members in the profile table who have a membership_id = 107 (i.e. get a subset of members who have membership type 107 and they will be listed in an array by profile_id)
Then using that subset of members, find all the conversations in the table mailbox_conversation that have a profile_id in the subset – thus many emails may have the same profile_id and I would like them all deleted
Find emails which correspond to profiles with membership_id = 107
Delete those records
SQL Fiddle for playing around.