in reply to Re: Check Time between 2 other times
in thread Check Time between 2 other times
select 1 where $my_date_time > $start_date_time and $my_date_time < $end_date_time
That’s un-SQLish. It can be better written as
SELECT 1 WHERE $my_date_time BETWEEN $start_date_time AND $end_date_time
(And of course, you’d pass the values in using placeholders, not by interpolating them into the SQL.)
Makeshifts last the longest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Check Time between 2 other times
by terce (Friar) on Nov 03, 2005 at 14:30 UTC | |
by Aristotle (Chancellor) on Nov 03, 2005 at 14:51 UTC |