Entry
How can I select rows within a certain date range?
Aug 10th, 1999 23:15
Nathan Wallace, Jason Brooke
It depends on how you're storing your dates, but the following should
give you some ideas:
select messagefield
from tablename
where datefield between $startdate and $enddate
or:
select messagefield
from tablename
where datefield >= $startdate and datefield <= $enddate
or:
select messagefield
from tablename
where datefield > $startdate and datefield < $enddate
(same as second one but adjust $startdate and $enddate to be just
outside the boundaries you seek - might help make sql faster, dunno)