Don't ask to ask, just ask | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Oh help me please Holy Monks, this one is killing me. I have an old pm module that does all the connecting and querying with MySQL, so I have faith in it. Now I am trying to retrieve multiple rows with all columns using selectall_hashref and am tripping all over myself. my $data_all = $connection->selectall_hashref($query, { 'Columns' => {} } ); And I get back: Not an ARRAY reference at /usr/local/lib/x86_64-linux-gnu/perl/5.26.1/DBI.pm line 2106. I know all the column names, this is not a read any strange table function. Somewhere my approach has it all wrong, should I take a different approach? What I am trying to get back is an array of hash references, that's al, to my multiple row query, and yes my query works manually. Can you help me? p.s. I found this thread <a href="https://www.perlmonks.org/?node_id=1040177 "target="_blank> How does DBI return an arrayref with key/value pairs? so I tried that, switching to selectall_arrayref But when I ran
What I got back was that $columns was another hash, and that led my second "say" to output nothing. So confused In reply to Having problems with DBI selectall_arrayref by SergioQ
|
|