in reply to Re^2: How to get an acceptable H::T AoH ref
in thread How to get an acceptable H::T AoH ref

Ah, I missed that. One way to handle it is to use the IN predicate of SQL instead of doing a loop:
"WHERE id IN (" . join ',',@ids . ")"
Another way would be to use the loop but instead of pushing the whole arrayref from the execute into your final array, you need to cycle through each arrayref and push that onto the final array:
push @$allshows,$_ for @{$sth->fetchall_arrayref({})}; instead of push @$allshows, $sth->fetchall_arrayref({});

Replies are listed 'Best First'.
Re^4: How to get an acceptable H::T AoH ref
by bradcathey (Prior) on Sep 10, 2004 at 21:34 UTC

    You are quite the SQL guru. And now I have some learning to do. Thanks a lot. I hope all this makes H::T happy in the final analysis.


    —Brad
    "Don't ever take a fence down until you know the reason it was put up." G. K. Chesterton