I have 2 tables:
- event_serie
- event
Every ‘event‘ has a relation to ‘event_serie‘ by event_serie_id foreign key and date_time column which is obviously time when event starts (YYYY-MM-DD HH:MM:SS format).
Now the funny and very difficult part for me – how can I select ‘event_serie’ which have events from the past ONLY or NO events at all? In other words I need to find ‘event_serie’ which have no today & future or 0 events.
I will appreciate both mysql and doctrine2 examples(if only it’s possible to do with DQL actually).
Any idea guys?
?