Help for this page

Select Code to Download


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