Using the tie gave me the exact same results as not using it, which lead me to believe that the order dbi stores the hash might be out of my control. An example of the more complicated statement, I'd like to use:use strict; use Data::Dumper; use DBI qw(:sql_types); use Tie::IxHash; tie my %results, "Tie::IxHash"; ... connect to db .... my $stmt = qq~SELECT * FROM registrants WHERE registrant_id = ?~; %results = % { $dbh->selectrow_hashref($stmt, undef, $registrant_id) } +;
Has anybody run across this before?my $stmt = qq~SELECT * FROM registrants, hotels, cadavers WHERE re +gistrants.registrant_id = ? AND registrants.registrant_id = hotels.re +gistrant_id~; %results = % { $dbh->selectrow_hashref($stmt, undef, $registrant_i +d) };
In reply to Maintaining column name and column order using DBI by Tatnall
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |