Well, it IS logical provided one is aware of the rules of the game, meaning,
as you rightly point out, that MySQL does not reject SQL statements for
incorrect values, but attempts at converting them "at any price". I have no
clue whether it is or not a shortcoming of the implementation (I do not know
what SQL-92 says about this). Therefore data validation should be done
outside MySQL.

----- Original Message -----
From: "Martin Marques" <[EMAIL PROTECTED]>
To: "Ignatius Reilly" <[EMAIL PROTECTED]>; "Peter Beckman"
Sent: Thursday, August 28, 2003 2:36 PM
Subject: Re: [PHP-DB] MySQL, PHP or ghost?

El Mié 27 Ago 2003 11:34, Ignatius Reilly escribió:
> Hmmm...
> You have a point; the doc is not quite clear.
> "Illegal YEAR values are converted to 0000"
> My understanding is that any illegal value will be first converted into
> '0000', then into the corresponding year inside the 1901-2155 interval, ie
> 2000
> Well, all this is quite logical. I have no quarrel with this behaviour.

Not at all. This is totally ilogical.
Wrong date values should give error messages.

See what happens when you try to bend a bad input value:


Please don't use MySQL in monetary aplications!!

Porqué usar una base de datos relacional cualquiera,
si podés usar PostgreSQL?
Martín Marqués                  |        [EMAIL PROTECTED]
Programador, Administrador, DBA |       Centro de Telematica
                       Universidad Nacional
                            del Litoral

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

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

Reply via email to