Select by Date, skipping the Date closest to today


#1

I am working on a website for a performing arts center. On the home page I want to feature the next event, which I can easily do with…

SELECT * FROM foo WHERE Date >= currentDate ORDER BY Date LIMIT 1

But what I’m having trouble with is the second section where I want to highlight a number of upcoming events. The problem is that I don’t want to repeat any notice for my “featured next event”, I want to skip over it.

I haven’t got my mind around this one yet and my searches have not uncovered anything… any suggestions?


#2

OK… so maybe I should read the SELECT syntax a little more closely before I post (Damn newbie!). The solution that I found a full 10 minutes after my post was…

SELECT * FROM foo WHERE Date >= currentDate ORDER BY Date LIMIT 1, 3

The key, of course being the Limit offset, which is the first of the number pair following LIMIT.

Unless I’m such a newbie that what I think is a solution really isn’t one at all… hmmmm.


#3

No, the way it sounds that should about do it.