Take the safe option and assign the SQL query to a string before using it.
The placeholders are ok with this as well.

my $sql = qq(select *  from testami where ? = ? and ? = ?);

$sth = $dbh -> prepare($sql);
$sth -> execute($field1, $value1, $field2, $value2);

#$sth -> execute();

Hope you didn't forget to uncomment this one!

Joni

Reply via email to