$i++ while $output[$i] = [ $sql->fetchrow_array ];
That loop never terminates. A reference is *always* true, even a reference to an empty array. However, you could write something like (I don't have DBI on the machine I'm currently working on, so this is untested):
my $output = $sql -> fetchall_arrayref; # Or my @output = @{$sql -> fetchall_arrayref};
If you are going to collect all results in a big array, let the DBI do the work for you.
Abigail
In reply to Re: DBI and fetching data
by Abigail-II
in thread DBI and fetching data
by Melly
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |