in reply to What are placeholders in DBI, and why would I want to use them?
... you can't use placeholders for variable-length WHERE IN('foo', 'bar', 'baz') constructs.
PostgreSQL offers the following construct:
where array[ column_name ] <@ ( ? )
you can then $sth->execute(), passing an arrayref (i.e.: ['foo', 'bar', 'baz'] ) to the single placeholder.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Answer: What are placeholders in DBI, and why would I want to use them?
by MidLifeXis (Monsignor) on Dec 30, 2015 at 13:38 UTC | |
by BrowserUk (Patriarch) on Dec 30, 2015 at 17:39 UTC | |
by MidLifeXis (Monsignor) on Dec 30, 2015 at 17:43 UTC |
In Section
Seekers of Perl Wisdom