Rudy Lippan wrote:On Wed, 26 Feb 2003, Tim Bunce wrote:Rudy Lippan wrote:I know there is a {NUM_OF_PARAMS} attribute and a {ParamValues} attribute, but is there a way to get the names of :foo style params before they are bound?
Umm, not officially currently but there's a good chance that keys %{$sth->{ParamValues}} would work on many drivers that support it.
I'll add a note to that effect in the docs so that'll become the standard way.
Please don't. Some drivers are completely unable to support named placeholders. Specifically, DBD::Informix cannot. The notations :xxx and :23 can both appear outside quoted strings in contexts that do not have anything to do with placeholders. [...]
SELECT * FROM [EMAIL PROTECTED]:owner.table WHERE somecolumn BETWEEN
DATETIME(1970:01:01 00:00:00) YEAR TO SECOND AND
DATETIME(1999:12:31 23:59:29) YEAR TO SECOND
There are no placeholders in that - but there's a :owner and eight :NN values in it.
Not to mention syntax errors - the date portions should be using '-' not ':' so the :NN count should be just 4, not 8.
SELECT * FROM [EMAIL PROTECTED]:owner.table WHERE somecolumn BETWEEN
DATETIME(1970-01-01 00:00:00) YEAR TO SECOND AND
DATETIME(1999-12-31 23:59:29) YEAR TO SECONDThese are just technicalities; it doesn't void my overall argument.
--
Jonathan Leffler ([EMAIL PROTECTED], [EMAIL PROTECTED]) #include <disclaimer.h>
Guardian of DBD::Informix 1.04.PC1 -- http://dbi.perl.org/
