Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: DBD:Pg getting output in an array

by poj (Prior)
on Jul 27, 2014 at 19:33 UTC ( #1095263=note: print w/replies, xml ) Need Help??


in reply to Re^2: DBD:Pg getting output in an array
in thread DBD:Pg getting output in an array

Try
my $labels = []; my $data = []; while (my $ref = $sth->fetchrow_hashref()) { push @$labels,$ref->{'Labels'}; push @$data,$ref->{'Data'}; }
poj

Replies are listed 'Best First'.
Re^4: DBD:Pg getting output in an array
by terrykhatri (Acolyte) on Jul 27, 2014 at 21:30 UTC
    Thanks Poj, its
    my $labels = []; my $data = []; while (my @row = $sth->fetchrow_array) { push @$labels, $row[0]; push @$data, $row[1]; }
    Rgds. Terry

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1095263]
help
Chatterbox?
[Discipulus]: but Dumas is waiting for me in the bed.. luckly as book author.. see you!
[ELISHEVA]: Sleep well!
[ELISHEVA]: Or read well
[Discipulus]: thanks, best dreams to you all

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2017-05-28 20:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?