Skeeve has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to use a bind variable in a SELECT ... IN statement, but can't figure out how to do it.
This one works:
SELECT * FROM mytabel WHERE mycolumn = :VAR1
I simply do a
$sth->bind_param(':VAR1', $myvalue);
But trying this:
only works if I bind just one value. Or to be precise: It seems as if it's only possible to supply one value.SELECT * FROM mytabel WHERE mycolumn in (:VAR1)
So $myvalue="1, 2, 3"; will result in searching for ('1, 2, 3') instead of (1, 2, 3).
is there any way to supply several values for :VAR1?
s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
+.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: DBD and bind_param (Oracle)
by herveus (Prior) on Dec 09, 2010 at 12:15 UTC | |
by Skeeve (Parson) on Dec 09, 2010 at 14:23 UTC | |
by herveus (Prior) on Dec 09, 2010 at 15:55 UTC | |
Re: DBD and bind_param (Oracle)
by mje (Curate) on Dec 09, 2010 at 10:37 UTC | |
Re: DBD and bind_param (Oracle)
by andreas1234567 (Vicar) on Dec 10, 2010 at 14:49 UTC |
Back to
Seekers of Perl Wisdom