Re: [newbie]How to call stored procedure using DBIx?
- From: Ben Morrow <ben@xxxxxxxxxxxx>
- Date: Sat, 29 Dec 2007 14:52:19 +0000
Quoth Tony Winslow <tonywinslow1986@xxxxxxxxx>:
Peter Scott wrote:<snip>
On Fri, 28 Dec 2007 22:58:25 +0800, Tony Winslow wrote:I tried it and got the following error:
The env: Catalyst, DBIx::Class, MySQL
If I can get a $dbh from what I already have from DBIx::Class, the
problem can be solved. Yet I can figure out a way to get it.
See DBIx::Class::Storage::DBI:
$schema->storage->dbh
DBI Exception: DBD::mysql::st execute failed: OUT or INOUT argument 1
for routine MyWikiDB.countRevs is not a variable or NEW pseudo-variable
Part of my codes:
my $dbh = $c->model('MyWikiDB')->schema->storage->dbh;
my $sth = $dbh->prepare("CALL countRevs(?)");
my $cnt;
$sth->bind_param(1, \$cnt);
Use ->bind_param_inout instead.
Ben
.
- References:
- Re: [newbie]How to call stored procedure using DBIx?
- From: Peter Scott
- Re: [newbie]How to call stored procedure using DBIx?
- Prev by Date: Re: Problem about type glob reference
- Next by Date: PERL CGI Script Responding to Link
- Previous by thread: Re: [newbie]How to call stored procedure using DBIx?
- Next by thread: Specifying options for Net::SFTP
- Index(es):