- $query = qq|SELECT curr FROM currencies ORDER BY id|;
-
- $form->{CURRENCIES} = [];
-
- $sth = prepare_execute_query($form, $dbh, $query);
- $sth->execute || $form->dberror($query);
- while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
- push @{ $form->{ CURRENCIES } } , $ref;
- }
- $sth->finish;
+ $query = qq|SELECT name AS curr FROM currencies ORDER BY id|;
+ $form->{CURRENCIES} = selectall_hashref_query($form, $dbh, $query);