in reply to Re^4: How to reach each element of 2d-array retrieved from Mysql query?
in thread How to reach each element of 2d-array retrieved from Mysql query?
Again, this is all guesswork based on reading the documentation.
my $sth = $dbh->query("select a, b from c where d=1"); while (my @row = $sth->fetchrow) { push @data, \@row; }
Will I have a column, and not a row?
You'll have a 2-dimensional array of rows and columns (or, more accurately, an array of rows where each element contains a reference to an array containing all of the columns from one record in the database).
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: How to reach each element of 2d-array retrieved from Mysql query?
by t-strong (Initiate) on May 25, 2006 at 09:13 UTC | |
by davorg (Chancellor) on May 25, 2006 at 09:55 UTC |