Hello Mark,

Wednesday, April 7, 2004, 6:19:31 PM, you wrote:

RD>> That .1% of the time being when you need to insert a value as now() ?
RD>> (which will break the string check as it'll wrap it with '' which will
RD>> cause MySQL to insert 0000-00-00 00:00:00) or if it's an enum field
RD>> with a numeric allowed value? :)

MA> Not really, since you usally format a timestamp into something thats db
MA> friendly. How many times have you written code where the date 02-01-2004

But now() IS a DB friendly format for MySQL and is the recommended way of
inserting the current time into a datetime or timestamp field.

Converting it to a timestamp/datetime locally first is a waste of
processing time IMHO and opens you up to a potential (although slight)
code error.

But, to get your function working, I can see the point :)

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to