update `<etanodb>`.`dsb_user_profiles` a, `<dsbdb>`.`user_details` b set a.`f6_state`=<ID from dsb_loc_states> where a.`fk_user_id`=b.`fk_user_id` and b.state='ID from $accepted_states';(repeat the above for every state you have in $accepted_states).

For the cities you have to do it manually in 2 steps:Make a list of all cities you have in DSB and insert them in dsb_loc_cities table in etano db.Then for every city:

update `<etanodb>`.`dsb_user_profiles` a, `<dsbdb>`.`user_details` b set a.`f6_city`=<ID from dsb_loc_cities> where a.`fk_user_id`=b.`fk_user_id` and lower(b.city)=lower('ft. lauderdale');(repeat the above for every city).

That's because the cities in DSB are textfields, not IDs like the states or countries but in Etano they are IDs too.You will have to repeat the sql query for variations of the city name: 'ft. lauderdale' / 'fort lauderdale', 'orlando' / ' or la ndo' , etc.It's going to be fun