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: DBI:
$row = $select->fetchrow_hashref

 



KeyCode
New User

Apr 15, 2009, 2:06 AM

Post #1 of 2 (3618 views)
$row = $select->fetchrow_hashref Can't Post

Is it possible to get hash instead of hashref?

Something like this?

%row = $select->fetchrow_hash

If this is not possible why is it not possible and getting array is possible:

@row = $select->fetchrow_array


FishMonger
Veteran / Moderator

Apr 15, 2009, 6:26 AM

Post #2 of 2 (3613 views)
Re: [KeyCode] $row = $select->fetchrow_hashref [In reply to] Can't Post

It is possible, but not supported in the current version of the DBI module.

It's only 1 additional simple/short line to take the hash ref and assign/copy it to a plain hash.

my %row = %$row;


(This post was edited by FishMonger on Apr 15, 2009, 6:27 AM)

 
 


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

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