I am dealing with a site that has several posts per week, and am organizing them by date, ie:
myscript.php?date=2002-02-24
Now, what I would like is that if there isn't an entry for this particular day, that instead of popping up lots of error messages, the date nearest to that in the database is picked. so if there were entries:
date=2002-02-21
date=2002-02-27
and the url was
date=2002-02-25
it would jump to "date=2002-02-27"
hoping there's some cool way to do that in SQL.
thanks,
Scott