I have three tables, category, countries and areas, the countries have the column for their names 'c_country' and another as a auto incremented ID as does the category table.
Work entries are made in the 'work' table using the 'category' id from the category menu and the 'country id' from the country menu, the menus mentioed use an option value of the id and use the name as the menu listing, e.g.
Code: Select all
'<option value="' . $c_id . '>' . $c_country . "</option>\r\n";I have been trying a LEFT JOIN but the problem is it returns an entry for each work entry, so the work country menu might look like: 'France, France, France, England, England' and not 'France, England'.
Code: Select all
"SELECT countries.c_id, countries.c_country FROM countries LEFT JOIN work ON countries.c_id = workj_c_id WHERE work.w_cat_id = " . $cat_id;Thanks in advance