Hi all,
Hope you are well. A have a problem formulating a query and hope someone can give me some advice.
The problem:
I have two tables, one named countries and one named distributor_info. I would like a list of all the countries in the countries table displayed. Next to each country is two radio buttons, one that says 'Yes' and the other 'No'.
The idea is that the user can select yes or no next to each country. If the user selects yes then the distributor table is updated with the country id. Each distributor can have more then one country added to the distributor_info table.
I have done the above part, but when i view the page and all countries are displayed i want the radio buttons to display if the distributor has been selected for a particular country. So the following:
USA Yes (selected) No
Belgium Yes No (selected)
UK Yes No (selected)
Basically i need a query for all countries and then a query on distributor_info table. If distributor_info table has the country display radio button yes selected, else radio button no selected. I hope i've explained it well enough. If not, please let me know. Thanks to everyone in advance for having a look, and for any help, support, advice.
Best Wishes,
Steven 🙂