I think you're the OP is misunderstanding the use of placeholders here. Typically you would use placeholders like so
So it seems what you are trying to do is have a long list of placeholders and then specify the values to use for the placeholders sometime before the execute is called. You want the statement to have all the ? marks in it. It doesn't need to be re-prepped that way. (Part of the beauty of placeholders)my $sql = q{SELECT * FROM tblX WHERE condition = ?}; $sth = $dbh->prepare($sql); $sth->execute($value_to_sub_for_question_mark);
However to do what you are wanting i think you would do this
That is untested and you may need to put the array in list context, but i think that's your intent.. just a guessmy $sql = q{SELECT * FROM tblX WHERE condition1 = ? and condition2 = ? +}; my $sth = $dbh->prepare($sql); $sth->execute(@array);
In reply to Re: Explanation of Code Problem
by Grygonos
in thread Explanation of Code Problem
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |