in reply to References of Eternal Peril
sub select { my $s = shift; my $sql = shift; my $sth = $s->dbh->prepare( $sql ) || $s->write_log("Can't prepare select ($sql): ".$s->dbh->errstr) +; $sth->execute() || $s->write_log("Can't execute select ($sql): ".$sth->errstr); $s->fields = $sth->{NAME}; my $x = 0; my @ar = (); while ( my $hr = $sth->fetchrow_hashref() ) { $ar[$x++] = $hr; } $s->rows = $x; $s->ar = \@ar; $sth->finish(); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: References of Eternal Peril (while we're on the subject)
by merlyn (Sage) on Aug 11, 2000 at 18:01 UTC | |
by DrManhattan (Chaplain) on Aug 11, 2000 at 19:01 UTC | |
by rdw (Curate) on Aug 11, 2000 at 21:59 UTC |