CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Storing a SQL table as a list of hashes

 



dcalfine
New User

May 25, 2010, 1:53 PM

Post #1 of 3 (275 views)
Storing a SQL table as a list of hashes Can't Post

I'm trying to store a SQL table as a list of hashes. That way, I can go to @list[0]{firstName} and retrieve the first name of the first person in the table, and so on. Is this easy to do with a few lines of code? I'm already using the DBI package and successfully connect.

Thanks!


Nila
User


May 25, 2010, 9:57 PM

Post #2 of 3 (271 views)
Re: [dcalfine] Storing a SQL table as a list of hashes [In reply to] Can't Post

If you are using DBI package , you can get your requirement easily.
Read the " man DBI " fully.


FishMonger
Veteran / Moderator

May 26, 2010, 5:07 AM

Post #3 of 3 (268 views)
Re: [dcalfine] Storing a SQL table as a list of hashes [In reply to] Can't Post

http://search.cpan.org/~timb/DBI-1.611/DBI.pm#fetchall_hashref

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives