Sebastian wrote:
Cory Robin wrote:
I'm trying to return all records between two dates.. The fields are
datetime fields...
Which is better? The following or using BETWEEN? (A little lost here)
SELECT * FROM passengers WHERE
reservation_date_time >= '2005-01-01 12:10:00'
AND reservation_date_time <= '2005-05-01 12:10:00';
i think you should be using BETWEEN
WHERE your_field BETWEEN '2005-01-01 12:10:00' AND '2005-05-01 12:10:00'
They are identical to mysql, but I think the BETWEEN version is easier
to read for most of us humans.
Michael
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]