sub _get_users { my $self = shift; my $sql = "select * from my_table order by username"; $self->dbh->{PrintError} = 0; $self->dbh->{RaiseError} = 1; # fetchrow_hashref? my $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; }
In reply to Using a better database fetch by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |