Yeah, that'll work on both 3.x and 4.x, assuming you get the leading apostrophe on the second number in there ; )
In 3.x omitting the quotes would also work, but not in 4.x, unless it's a date column (rather than datetime). The reason is that they are protecting the numeric input as a means for dealing with timestamp columns (which are stored numerically), and datetime and date columns (stored as strings) use string values. I'd recommend using a formatted string to make it 100% clear that it is a character string you're passing, rather than number that happens to be in quotes: where datefield between '2002:07:09 00:00:00' and '2003:07:09 00:00:01' The delimiter used is inconsequential, you can use pretty much any punctuation character, and you can use several in a single value (2003:07/09 00+00-00). I use colons throughout for consistency, but that's personal preference. --- Barney Boisvert, Senior Development Engineer AudienceCentral [EMAIL PROTECTED] voice : 360.756.8080 x12 fax : 360.647.5351 www.audiencecentral.com > -----Original Message----- > From: Matt Robertson [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 09, 2003 10:04 AM > To: CF-Talk > Subject: RE: CF5 to MySQL without ODBC > > > Thanks Barney. Very useful info. I have never been fully comfortable > with mySQL dates but if that's the underlying way to manually construct > then my problems are solved. I've been using straight numeric fields in > some cases with a yyyymmdd input mask. > > Can this be used in SQL queries? i.e. > > Where datefield between '20020709000000' and 20030709000000' > > -------------------------------------------- > Matt Robertson [EMAIL PROTECTED] > MSB Designs, Inc. http://mysecretbase.com > -------------------------------------------- > > -----Original Message----- > From: Barney Boisvert [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 09, 2003 9:46 AM > To: CF-Talk > Subject: RE: CF5 to MySQL without ODBC > > > One thing to watch is dates. If you're using datetime columns, you can > no > longer specify a date like this: > > 20030709 > > You have to make it a string, and 14 digits long (to include the time): > > '20030709000000' > > The recomended format is 'yyyy/mm/dd hh:mm:ss', which is more readable > than > the long number. If you specify the former it does not throw an error. > It > will consider it an invalid date, and convert it to all zeros, which > will > match all or none of your rows, depending on what the comparison is. > This > bit me on the rear when I moved to 4.0, although it was simple to fix. > > --- > Barney Boisvert, Senior Development Engineer > AudienceCentral > [EMAIL PROTECTED] > voice : 360.756.8080 x12 > fax : 360.647.5351 > > www.audiencecentral.com > > > > -----Original Message----- > > From: Matt Robertson [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, July 09, 2003 9:28 AM > > To: CF-Talk > > Subject: RE: CF5 to MySQL without ODBC > > > > > > >Versoin 3.23.49-nt. Any recommendations for or against moving to > MySQL > > 4.0? > > > > That's not the last but one of the later versions. 3.23.53 was the > last > > one I remember seeing. > > > > I would absolutely upgrade. > > > > One thing 4.x has over 3.x is a cache that cranks speed up > > significantly. Also 4.x is now production... The thing was beta for > > something crazy like a year and a half. > > > > One thing that disappeared in the move to 4.x is that 3.x occasionally > > turned up with corrupted tables. These were easy to fix but the move > to > > 4 in production (made maybe a year ago?) wiped this issue out forever. > > > > -------------------------------------------- > > Matt Robertson [EMAIL PROTECTED] > > MSB Designs, Inc. http://mysecretbase.com > > -------------------------------------------- > > > > > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

