I've found something that works (in MySQL 5, anyway), but I don't know
whether it's accepted practice.
If I want to find all records with a date in, say, March 2006, it works if I
use "datefield like '2006-03%'" because it's a string.
This seems kind of obvious and a lot tidier than doing "datefield >=
'2006-03-01' and datefield <= '2006-03-31'", but are there pitfalls I should
know about?
Speed would be my first thought... I'd time them. I'd also prepend
'explain' as I'm guessing the first won't use an index and the second will
(assuming you have indexes).
-p
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]