#!/usr/bin/perl # Stored Proc - Multiple Values In, Multiple Out use strict; use Data::Dumper; use DBI; my $dbh = DBI->connect('DBI:mysql:RTPC;host=db.server.com', 'user','password',{ RaiseError => 1 }) || die "$!\n"; my $sth = $dbh->prepare('CALL storedProcedure(?,?,?,?,@a,@b);'); $sth->bind_param(1, 2); $sth->bind_param(2, 1003); $sth->bind_param(3, 5000); $sth->bind_param(4, 100); $sth->execute(); my $response = $sth->fetchrow_hashref(); print Dumper $response . "\n";
It took me a while to figure this out, but I was able to get what I needed with the above. if you need to get some return "strings", I assume that you just ...
while(my $response = $sth->fetchrow_hashref()) { print Dumper $response . "\n"; }
Hope this helps.
Nexion
source share