I have the following query to create a multi level drop down menu for events (region, county, city):
FROM events E
JOIN provinces P
ON E.province_id = P.province_id
JOIN counties CO
ON E.county_id = CO.county_id
JOIN cities C
ON E.city_id = C.city_id
But I get an empty string for city_eng? This is one of my test inserts in the table events:
INSERT INTO `events`
(`event_id`, `province_id`, `county_id`, `city_id`, `event_name_eng`, `event_name_gr`, `event_venue_eng`, `event_venue_gr`, `event_date`, `end_date`, `event_text_eng`, `event_text_gr`, `event_telephone`, `event_email`, `isPending`)
(13, 1, 3, 13, 'Test Name', NULL, 'Test Venu', NULL, '2011-01-03', NULL, 'Test', NULL, '26756 6543', 'firstname.lastname@example.org', 1);
As you can see there is a city_id present in the inser, but somehow It keeps giving me a empty string.
My guess is that id (13) isn't present in the cities table
Hi Guido, unfortunately it is! That was my first of thought as well!
Really? Did you try that query in PHPMyAdmin (or whatever program you use to manage your database?
donboe, your missing an entry for city_eng in that insert query