in reply to Re: Retrieving multiple records from database
in thread Retrieving multiple records from database
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?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Retrieving multiple records from database
by jZed (Prior) on Oct 16, 2004 at 19:07 UTC | |
Re^3: Retrieving multiple records from database
by davido (Cardinal) on Oct 17, 2004 at 06:38 UTC | |
by bradcathey (Prior) on Oct 17, 2004 at 11:52 UTC | |
by davido (Cardinal) on Oct 17, 2004 at 15:41 UTC |