dflow Posted November 17, 2010 Share Posted November 17, 2010 i want a list of the event type name where there are records with content SELECT DISTINCT event_types.EventType FROM city_events, event_types WHERE city_events.Event_Content <> '' AND city_events.CityID =100 ORDER BY event_types.EventLevel ASC LIMIT 0 , 30 Link to comment https://forums.phpfreaks.com/topic/218959-seems-simple-what-am-i-missing/ Share on other sites More sharing options...
ManiacDan Posted November 17, 2010 Share Posted November 17, 2010 You don't join the two tables. -Dan Link to comment https://forums.phpfreaks.com/topic/218959-seems-simple-what-am-i-missing/#findComment-1135497 Share on other sites More sharing options...
dflow Posted November 17, 2010 Author Share Posted November 17, 2010 ok one of these days forgetting stuff thanks SELECT DISTINCT event_types.EventType FROM city_events, event_types WHERE city_events.Event_Content <> '' AND city_events.CityID =100 AND event_types.Event_TypeID = city_events.Event_TypeID ORDER BY event_types.EventLevel ASC LIMIT 0 , 30 Link to comment https://forums.phpfreaks.com/topic/218959-seems-simple-what-am-i-missing/#findComment-1135516 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.