Reputation: 3833
In one of my mysql tables I have columns start
stop
.
For example the value of start is 2011-01-21
and the value of stop is 2011-03-23
.
Assuming today is 2011-03-10
how to determine that "today" is between start and stop period ?
Upvotes: 0
Views: 683
Reputation: 37464
Hmmm bit ambiguous but you could store today date in a variable and do a "select start, stop from table" then in a PHP for loop you could evaluate whether your today variable is between the two date values?
Upvotes: 0
Reputation: 29381
select
*
from
`tbl`
where
now() between `the_start_date` and `the_end_date`
Upvotes: 0