JK: What I really want it to return however, is an array of hashes. According
JK: to the Perl DBI API, this method does exactly that if you pass it a hash
JK: slice reference argument. Can anyone provide some sample code for doing
JK: this?
my $rows = $dbh->selectall_hashref("SELECT * FROM table_name");
# voila!
for my $row ( @{ $rows } ) {
# now $row is a hashref
print value %{$rows};
print "\n";
}
JK:
JK: Thanks.
JK:
JK: Jani
JK:
JK:
JK: ---------------------------------------------------------------------
JK: Before posting, please check:
JK: http://www.mysql.com/manual.php (the manual)
JK: http://lists.mysql.com/ (the list archive)
JK:
JK: To request this thread, e-mail <[EMAIL PROTECTED]>
JK: To unsubscribe, e-mail
<[EMAIL PROTECTED]>
JK: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
JK:
--
Sherzod Ruzmetov <[EMAIL PROTECTED]>
http://www.UltraCgis.com, Consultant
989.774.6265
+----------------------------------------+
| There is nothing wrong with your tools.|
| But we can make a better one. |
+----------------------------------------+
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php