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.
In reply to Re^2: Check Time between 2 other times
by Aristotle
in thread Check Time between 2 other times
by dtharby
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |