![]() |
|
Do you know where your variables are? | |
PerlMonks |
Re: DBI fetchall_arrayref using $max_size doesn't dereference normally.by gmax (Abbot) |
on Jul 28, 2005 at 19:21 UTC ( #479100=note: print w/replies, xml ) | Need Help?? |
If you call $sth->fetchall_arrayref(undef,$max_rows) like you do, then your result will be an array of arrays, not an array of hashes, like you would like. Moreover, your usage of $max_rows is not recommended. The docs state clearly that you should use a buffer to fetch records using that parameter.
Last, but not least, be aware that you are using the same statement handler for a outer and an inner loop. That is a mistake! The second "prepare" will reset $sth, and it will not continue fetching records. You must use two of them, one for fetching records, and one for updating. Please see:
Update _ _ _ _ (_|| | |(_|>< _|
In Section
Seekers of Perl Wisdom
|
|