On Fri, 02 Nov 2001 07:27:49 -0500, Scott R. Godin wrote:

>    my %db;
>    $sth->bind_columns( \( @db{ @{ $sth->{NAME} } } ));# magic
>
>    while ($sth->fetch)
>    {
>        #... and no worries about which order the columns get returned in
>        #... since you access them via the $db{ColumnName} method :)

What's the advantage of this approach over

        while(my $db = fetchrow_hashref) {
            ...
        }

and accessing the datae through $db->{ColumnName}?

I can see nothing but an alternative, but highly equivalent method.

-- 
        Bart.

Reply via email to