I recently asked a question about Self-Joins and I got a great answer.
The query is meant to find the ID, Start Date, and Price of Event2, Following Event1 by 1 Day.
The code WORKS fine. But I don't understand HOW.
Could someone explain as thoroughly as you can- what the different parts of the query are and what they do?
SELECT event2.id, event2.startdate, event2.price
FROM mm_eventlist_dates event1
JOIN mm_eventlist_dates event2
ON event2.startdate = date_add(event1.enddate, INTERVAL 1 DAY)
WHERE event1.id=$id
I really appreciate your help, for whatever reason I'm having a really hard time wrapping my head around this.