Re: MySQL, PHP or ghost?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Ignatius
_________________________
----- Original Message -----
From: "Martin Marques" <martin@bugs.unl.edu.ar>
To: "Ignatius Reilly" <ignatius.reilly@free.fr>; "Peter Beckman"
<beckman@purplecow.com>
Cc: <php-db@lists.php.net>
Sent: Thursday, August 28, 2003 2:36 PM
Subject: Re:  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:

http://archives.postgresql.org/pgsql-general/2003-07/msg00599.php

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                  |        mmarques@unl.edu.ar
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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux