in reply to Return Array of Hashes DBI (MYSQL)

See the ->fetchall_arrayref method of DBI, and the slice parameter, which allows you to specify that you want hashes back:

my $emps = $dbh->selectall_arrayref( "SELECT ename FROM emp ORDER BY ename", { Slice => {} } ); foreach my $emp ( @$emps ) { print "Employee: $emp->{ename}\n"; }

Replies are listed 'Best First'.
Re^2: Return Array of Hashes DBI (MYSQL)
by expresspotato (Beadle) on Dec 08, 2009 at 11:22 UTC
    Perfect! Still kinda odd its attaching to the DBH rather than the STH, but what do I know!

      The same, or at least similar methods are available for the STH as well.