[thelist] SQL select by date
rudy
r937 at interlog.com
Thu Apr 18 15:48:02 CDT 2002
>OPTION 1) use date_start, and make date_end NULL for one-day events
it'll be easier if one-day events had the same date in both start_date and
end_date (see below)
> is this effectively the same as the following?
yes, your restatement of the query with the compound WHERE clause is the
same as the UNIONs
> OPTION 2) give date_start and date_end the same value in one-day events
>
> SELECT everything
> FROM events
> WHERE edate_start <= form.thedate
> AND edate_end >= form.thedate
>
> am I on the right track(s)? in the right country?
yes, that works just fine for what you want
and it's simpler than option 1
rudy
More information about the thelist
mailing list