On Tue, 7 Apr 2009, Terrence Brannon wrote:
Yes, I would determine that aribtrary 1 second or nanosecond based on
the data in my database tables. a MySQL BETWEEN clause includes its
endpoints.
Unfortunately, BETWEEN is kind of broken.
What people generally want is:
$x <= Column < $y
But unfortunately BETWEEN gives you:
$x <= Column <= $y
Your solution, to subtract from $y, is not a good idea, since it's extra
code which could break, and the math confuses the issue, which is that you
really meant to write the first comparison.
So just suck it up and write:
WHERE col >= ?
AND col < ?
-dave
/*============================================================
http://VegGuide.org http://blog.urth.org
Your guide to all that's veg House Absolute(ly Pointless)
============================================================*/