$sth = $dbh->prepare("select a from b where c=? and (d=? or f=?)"); $sth->execute( $cval, $dval, $fval );