Thanks gmax (I was secretly hoping you'd see this OP). Ended up with a more familier:
$stmt = qq/SELECT somedata FROM table WHERE id IN (/ . join(',', ('?') + x @ids_to_match ) . qq/)/; $sth = $dbh->prepare($stmt); $sth->execute(@ids_to_match); my $results = $sth->fetchall_arrayref({});
My next question is why does fetchrow_array() only return an array of 1 element, but fetchall_arrayref({}) nabs them all?
In reply to Re^2: Retrieving multiple records from database
by bradcathey
in thread Retrieving multiple records from database
by bradcathey
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |