update new_calls_display set city_id = '3' where cus_city like '%Madurai%'
above mysql query i want to change the city_id value dynamically and also corresponding cus_city also change dynamically from the current table(new_calls_display) using php coding
city_id cus_city
1 Chennai
2 Ariyalur
2 Ariyalur
3 Madurai
3 Madurai
3 Madurai
1 Chennai
1 Chennai
like above table cus_id 1 to 50 so cus_city also 50 unique values