I am using DBI and Oracle 10. I want to use placeholders as I have read this is the best way to do things. my code looks like this
$sth=$dbh->prepare("Update Customers set RESULTS =('?') where rec_no=?
+");
foreach my $row ( @rows ) {
$sth->execute($row->{'SQL'},$row->{'REC_NO'}) or die $dbh->errstr
+;
}
$row->{'SQL'} contains the sql I want to execute for the sub query, $row->{'REC_NO'} contains a unique integer. I get error
DBD::Oracle::st execute failed: called with 2 bind variables when 1 are needed. Please advize how to use place holders properly with a sub query.
TIA