I have this query
SET district.countyID = county.ID
FROM county as c INNER JOIN district ON c.county = district.county
INNER JOIN county on county.province = district.province;
which should compare 2 cols in county table and district table and if they are same then get the id of the county table and insert in the district countyid col. but it is not working. it is only checking for the province name and inserting the id.