in reply to DBD::mysql and binding placeholders
DBD::Sybase will do the right thing for "normal" placeholders - i.e. for plain SQL statements. This is because the Sybase protocol performs this discovery for you, and so DBD::Sybase knows what type any parameter is (as an aside, this is also why the WHERE (product_code = ? OR (? IS NULL AND product_code IS NULL)) construct does NOT work with Sybase - there is no way to determine the type of the second placeholder!).
For exec some_proc ? statements DBD::Sybase works like MySQL. It would be possible to look up the type of each parameter, but it's an overhead that I didn't want to code into the driver. Hence DBD::Sybase will assume SQL_CHAR unless told otherwise.
The difference with MySQL is that Sybase won't accept a CHAR string where an INT/NUMERIC/FLOAT is expected, and throws an error - so at least you wouldn't be left wondering why it is slow... :-)
Michael
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DBD::mysql and binding placeholders
by theguvnor (Chaplain) on Sep 22, 2004 at 17:03 UTC | |
|
Re^2: DBD::mysql and binding placeholders
by htoug (Deacon) on Sep 23, 2004 at 13:53 UTC |