in reply to DBD::SQLite, how to pass array in query via placeholder?
As Corion already pointed out, but more explicitly stated:
my @in_vals = (1,2,3); my $in_placeholders = join ',', ('?') x @in_vals; my $sth = $dbh->prepare(qq{select * from foo where bar=? and baz in ($ +in_placeholders)}); $sth->execute(1, @in_vals) or die $dbh->errstr;
|
|---|