in reply to how do i store the result from query into hash
$hash_ref = $sth->fetchrow_hashref('NAME_lc');
NOTE: NAME_lc was passed so all names are converted to lower case(a _uc would cause upper case). This is because some databases change the case rather whimsically, for their own reasons. This way you can be sure that you are accessing the correct name.
(Programming The Perl DBI says, however, that in future releases, the DBI will implement the *same* hash return for memory efficiency; i.e., copying the data may be neccessary). UPDATE:I didn't fully answer the question, as arturo pointed out.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: how do i store the result from query into hash
by arturo (Vicar) on Jun 19, 2001 at 01:03 UTC |