develooper Front page | perl.dbi.dev | Postings from May 2006

Re: DBD::mysql and multiple statements

Thread Previous | Thread Next
From:
Patrick Galbraith
Date:
May 4, 2006 07:39
Subject:
Re: DBD::mysql and multiple statements
Message ID:
445A1206.90608@mysql.com
Henri Asseily wrote:

> On a slightly different topic, I noticed yesterday that DBD::mysql  
> still doesn't have support for multiple statements (and result sets).  
> There's a patch out there that I applied and that seems to work, but  
> having also been using DBD::Sybase's multiple return set technique  
> extensively, I wonder if we shouldn't bake into DBI a framework for  
> returning multiple result sets.
>
> Right now, the mysql patch that I talked about expects you to know  
> how many result sets are coming back, and do "while fetchrow..." on  
> them (or wrap that and trap an error), while DBD::Sybase expects code  
> like:
>             do {
>                 while($d = $sth->fetch) {
>                    ... do something with the data
>                 }
>             } while($sth->{syb_more_results});
>
> Would there be a good reason not to request a certain standard  
> behavior from the multiple DBDs out there that support multiple  
> statements/result sets?
>
> H

Henri,

Please see the latest 3.0006_1 branch via SVN (which will be released to 
CPAN tonight). It has support for multiple result sets, and even now 
includes examples of how to use them.

Kind regards,

Patrick

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About