Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Simple db select output script hanging up.

by ozone (Friar)
on Jun 22, 2007 at 17:49 UTC ( #622867=note: print w/replies, xml ) Need Help??


in reply to Simple db select output script hanging up.

replace
$k = 0; while (@results = $sth->fetchrow_array()) { $data[$k] = [ @results ]; $k++; }
with
while($results = $sth->fetchrow_array_ref()) { push @data, $results; }

and see if that makes any difference

Also, it seems to me that you don't have 'use strict;' or 'use warnings;' - add them and you might find that Perl will point out an obvious error

Replies are listed 'Best First'.
Re^2: Simple db select output script hanging up.
by punch_card_don (Curate) on Jun 22, 2007 at 18:09 UTC
    Another interesting suggestion - so I tried it (with the necessary typo correction from fetchrow_array_ref to fetchrow_arrayref) - no change.

    As for strict and warnings, the presented code is just the pertinent snippet.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://622867]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2022-05-29 08:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (101 votes). Check out past polls.

    Notices?