-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mon, Apr 04, 2005 at 03:41:56PM +0100, Steve Hay wrote: > What is bind_param() supposed to do when given invalid data, i.e. data > that doesn't match the specified type?
I don't believe DBI attempts to do anything about this. It simply passes the value on and lets the database deal with it. After all, you may be wanting the database to perform an explicit type conversion. On Oracle or PostgreSQL, your example would have thrown an invalid number or type mismatch error. > Binding parameters: UPDATE foo SET str = 'one', num = 1.#INF WHERE > id = 1 You're being bitten by two things: 1. MySQL doesn't actually support placeholders; DBD::mysql emulates them by interpolating the value into the SQL directly. 2. MySQL allows # as an alternative to the ANSI --, to start a comment that goes to end-of-line. Knowing those two things, I think you can figure out why your SQL is giving such bizarre results. - -- Stephen Clouse <[EMAIL PROTECTED]> Senior Programmer/DBE, Core Technology Developer The IQ Group, Inc. <http://www.theiqgroup.com/> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQFCUYNNy3uolkRT3A0RAolsAJ4j5+S1nRlMoKu50Ypmbv2P42CRiACePeDu u7vQvCcOMAcFP/jPmnErOqk= =gCpU -----END PGP SIGNATURE-----
