Error: 'Argument ":foo" isn't numeric in subroutine entry.'
DBI states "Some drivers also allow placeholders like :name and :N (e.g., :1, :2, and so on) in addition to ?, but their use is not portable."
Other drivers like DBD::Oracle and DBD::Pg already have named bind parameter support. I'd like for DBD::MySQL to support it as well.
$sth->bind_param(":foo" => "myfoovalue");
I'm running perl-DBD-MySQL-4.017-1 but I checked the change log and RT and did not find this capability in newer version or logged on RT.
Thanks,
Mike
Examples
DBD::Pg
$ perl -MDBIx::Array::Connect -e 'print DBIx::Array::Connect->new->connect("pg1")->sqlscalar("select :foo::text", {foo=>"foo"}), "\n"'
foo
DBD::Oracle
$ perl -MDBIx::Array::Connect -e 'print DBIx::Array::Connect->new->connect("ORA1")->sqlscalar("select :foo from dual", {foo=>"foo"}), "\n"'
foo
DBD::MySQL
$ perl -MDBIx::Array::Connect -e 'print DBIx::Array::Connect->new->connect("mysql1")->sqlscalar("select :foo", {foo=>"foo"}), "\n"'
Argument ":foo" isn't numeric in subroutine entry.
DBD::mysql::st bind_param failed: Illegal parameter number.
mrdvt92