in reply to Re^2: abstraction -- level up!
in thread abstraction -- level up!
But why would you have to? Just pass in the SQL and the selected id:
sub make_select { my ($dbh, $sql, $args, $id) = @_; my $items = $dbh->selectall_arrayref($sql, {Slice => {}}, $args); for ($items) { $_->{selected} = 1 if $_->{id} == $id; } return $items; }
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: abstraction -- level up!
by geektron (Curate) on Jun 16, 2004 at 23:07 UTC | |
by jeffa (Bishop) on Jun 17, 2004 at 14:42 UTC | |
by geektron (Curate) on Jun 17, 2004 at 19:57 UTC | |
by jeffa (Bishop) on Jun 17, 2004 at 20:15 UTC |