Tomy $sth = $self->dbh->prepare($sql); $sth->execute(); my $rs = $sth->fetchall_arrayref( { user_id => 1, username => 1, first_name => 1, last_name => 1 } ); return $rs;
Where the return is optional as well.return $self->dbh->selectall_arrayref($sql, { Slice => {} });
In reply to Re: Using a better database fetch
by Neighbour
in thread Using a better database fetch
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |