I have a Page in which i am assigning Cities to User The user Table is like that (userID(Primary),Name,City(Foreign_Key),Email)
one user can have multiple cities for that purposes i made another table with name UserCities(Recordid(P),City(Foreign key),User_ID(Foreign_KEY )
The Cities are present in their own table like
(CityID(P),CITYName)
CITY ID(P) | NAme |
1 | A |
2 | B |
3 | C |
The UserDistrict Table is having UserID(foreignkey) and CityID(foreignkey)
RecordID(P) | UserID(Foreign) | CITY_ID(ForeignKey) |
1 | 1 | 1 |
2 | 1 | 2 |
3 | 1 | 3 |
Now I am saving these records and I have Checkboxlist for showing the cities on edit how i show the checkbox checked based on UserDistrict Table , I am asking how i am reading multiple rows and make the check box checked .