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?

--
Cheers... Chris
Highway 57 Web Development -- http://highway57.co.uk/

Is there something that sticks out that
makes you an exceptional pole-vaulter?
   -- Adrian Chiles (to Sergei Bubka), BBC Radio 5 Live

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to