- or download this
select a , b , c from test
where (a = :var1 and b = :var2)
or (a = :var1 and c = :var3)
- or download this
select a , b , c from test
where a = :var1 and ( b = :var2 or c = :var3 )
- or download this
$sth = $dbh->prepare("select a from b where (c=? and d=?) or (c=? and
+f=?)");
$sth->execute( $cval, $dval, $cval, $fval );
- or download this
$sth = $dbh->prepare("select a from b where c=? and (d=? or f=?)");
$sth->execute( $cval, $dval, $fval );