Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
what i'd ideally like is something like$query=$dbh->prepare($SQLstatement); $query->execute(); $row=$query->fetchrow_hashref; $storedProfile = {}; $storedProfile{user_id} = $row->{user_id}; # copy over each item from the result row $query->finish();
for the life of me, i can't figure out how to get either to work perlmonks, enlighten me%storedProfile = %row; or @keys = keys %row; for (@keys){ $storedProfile($key) = $row($key); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: getting the columns names from a mysql query
by joealba (Hermit) on May 02, 2002 at 04:39 UTC | |
by blakem (Monsignor) on May 02, 2002 at 07:47 UTC | |
by Anonymous Monk on May 02, 2002 at 05:11 UTC | |
|
Re: getting the columns names from a mysql query
by lachoy (Parson) on May 02, 2002 at 05:18 UTC | |
|
Re: getting the columns names from a mysql query
by grep (Monsignor) on May 02, 2002 at 04:54 UTC | |
by Anonymous Monk on May 02, 2002 at 05:08 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |