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 Quote 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 Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.