title: PHP Query using WHERE, AND & OR Statement Issue
body: <p>I'm having problems understanding why my OR statement doesn't produce the results I want.</p>
  
  <pre><code>if ($result = $mysqli-&gt;query("SELECT 
  orderheader.ordernumber As Order_Number
  , ccilog.orderid AS Order_ID
  , orderheader.billingcontactfirstname AS Customer_Name
  , orderheader.billingcontactlastname AS Customer_Surname
  , orderheader.billingcustomeremailaddress AS Customer_Email
  , orderheader.webbrandcode AS Brand_Code
  , orderitems.productname AS Product_Name
  , orderitems.qty AS Item_Qty
  , orderheader.datecreated AS Order_Date 
  FROM orderheader 
  LEFT JOIN ccilog ON orderheader.id=ccilog.orderid
  LEFT JOIN orderitems ON ccilog.orderid=orderitems.orderid 
  WHERE orderitems.status = '0' 
  AND orderheader.status != '1'
  AND orderitems.webbrandcode = 'brand1' || orderitems.webbrandcode = 'brand2' 
  AND orderheader.billingcustomeremailaddress != 'email1@email.co.uk'
  AND orderheader.billingcustomeremailaddress != 'email2@email.co.uk'
  "))
  </code></pre>
  
  <p>If I remove the line:</p>
  
  <pre><code>AND orderitems.webbrandcode = 'brand1' || orderitems.webbrandcode = 'brand2' 
  </code></pre>
  
  <p>My results display ok and my rules work displaying Brand1, 2 and 3. When I add the above line in, I expect to see the same results but without brand 3. Brand 3 doesn't show which is great, but it seems that now it lists all of brand 2 and not just the rows where the previous order status statements are true.</p>
  
  <p>I can't understand why my results are not just returning the 11 results I expect (It's returns 425) almost most of Brand 2's results.</p>