FAQ
I need to write a wrapper function for calls to
$sth->fetchrow_array() where the SELECT statement will return multiple
rows.

such that

sub do_sql_array ($@) {
# on initial call: $sth = $dbh->prepare(); $sth->execute();
# on initial and subsequent until no more rows: return on row from
# $sth->fetchrow_array()
# on no more rows to return: return () - an emply list
}

I know this can be down with a closure or an OBJECT, but for some reason
its escaping
me. Anything like this been done before ?

Anyone point me in the right direction ?

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 3 | next ›
Discussion Overview
groupdbi-users @
categoriesperl
postedJun 13, '02 at 7:18a
activeJun 13, '02 at 9:09a
posts3
users3
websitedbi.perl.org

People

Translate

site design / logo © 2022 Grokbase