Skip Menu |

This queue is for tickets about the DBD-mysql CPAN distribution.

Report information
The Basics
Id: 73463
Status: resolved
Priority: 0/
Queue: DBD-mysql

Owner: Nobody in particular
Requestors: MRDVT [...]
tim [...]

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)

Subject: Support for named placeholders
Download (untitled) / with headers
text/plain 399b
It would be nice if DBD::mysql supported named placeholders ("SELECT * FROM table WHERE column = :placeholder;"). Apparently, this had been already proposed for 3.0 (cf. <URI:>), but if it has been implemented as well, I cannot find it :-). The syntax ":placeholder" seems to be supported by both DBD::Pg and DBD::SQLite.
Subject: Add bind_param named parameter bind support
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

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to