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.
In reply to Re: Retrieving multiple records from database
by pernod
in thread Retrieving multiple records from database
by bradcathey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |