in reply to Retrieving multiple records from database
I usually do:
my $stmt = "SELECT somedata FROM table WHERE id IN( " . join( ", ", @i +ds_to_match . " )";
Although this assumes that all the id's are properly validated. I don't really like this solution myself as it does not use placeholders. Care should therefore be taken to avoid SQL-injection attacks.
I look forward to seeing better solutions to this problem. Just my two cents anyway :)
pernod
--
Mischief. Mayhem. Soap.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Retrieving multiple records from database
by pg (Canon) on Oct 16, 2004 at 18:21 UTC |