in reply to selectrow_hashref upper/lower case
Both fetchrow_arrayref and fetchrow_hashref return the same arrayref (I think the docs say that the behavior on the hashref may change to do this, so you may want to change for forward compatibility). Ovid's answer above is okay since he is making a copy of the array every time. Another possiblility is to use one of the $sth->{NAME} attributes. E.g.:
I think Oracle does have some sort of LIMIT clause (update: oh yeah, see rownum below...), though its called something else I believe...check the Oracle docs...besides, selectall_arrayref and fetchall_arrayref have a $max_rows parameter...see those also.$sth->execute(...); my $names = $sth->{NAME_lc}; while (my $row = $sth->fetch) { my %hash; $hash{@$names} = @$row; push @data, \%hash; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: selectrow_hashref upper/lower case
by valdez (Monsignor) on Oct 02, 2002 at 09:26 UTC |