in reply to Re: Extra iteration while fetching 'fetchrow_array' in DBI and standerd way of using DBI
in thread Extra iteration while fetching 'fetchrow_array' in DBI and standerd way of using DBI
SELECT *
I sometimes use 'select *' but it is usually combined with something like:
But then you have to be watch out for columns that get renamed or deleted that you explicitly use in the while loop, etc. (and all selected fields must have an explicit name, e.g., you need an alias for calculated fields).$sth->execute(); my @columns = $sth->{NAME_uc}; my %row; $sth->bind_columns( \@row{@columns} ); while ( $sth->fetch() ) { ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Extra iteration while fetching 'fetchrow_array' in DBI and standerd way of using DBI
by roboticus (Chancellor) on Jun 16, 2007 at 04:22 UTC |