It dosent say this in the docs but I presume its because you need to pass the value as 
a string  or the value will result in 0000, which in year terms is wrong because there 
never was a year 0000.
I guess their reasoning is that if you have passed a "" then you havent broken this 
rule and so it shouldnt default to a none existant year, i.e. 0000.

like i said, its not in the docs (at least I couldnt find anything in the time / dates 
part), if you feel its important you could maybe insert a comment in the the YEAR 
section of the docs.

-----Original Message-----
From: Peter Beckman [mailto:[EMAIL PROTECTED]
Sent: 27 August 2003 15:29
To: Griffiths, Daniel
Subject: RE: [PHP-DB] MySQL, PHP or ghost?


On Wed, 27 Aug 2003, Griffiths, Daniel wrote:

> mysql will default to 2000 for a year value if you pass it "" as an entry
> because it will accept short values for the years this century, eg pass
> it "1" and it'll give you 2001, so it thinks "" is nothing. if you want
> to default to this year pass it NOW().

 I guess that's why I'm confused.  An empty quoted string shouldn't assume
 that I mean "0"; if I meant "0" I would enter "0".  It should assume I
 mean to make it nothing, and by nothing I mean an unquoted 0, or 0000.

 I just want to know where in the manual it says that passing YEAR an empty
 quoted value will cause MySQL to understand that value as a quoted "0" and
 then make the year 2000.  It's not in the YEAR section.

Beckman
---------------------------------------------------------------------------
Peter Beckman                                                  Internet Guy
[EMAIL PROTECTED]                             http://www.purplecow.com/
---------------------------------------------------------------------------

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

Reply via email to