title: Sql Left join returns nothing
body: <p>I want to join table of <strong>products</strong> and table of <strong>orders</strong> in a way that all products are listed and price of all ordered product by current user are shown (However some of those prices are 0 because there is no order submitted for that product).</p>
  <p>As the user confirms the list, An invoiceId is produced for all products in this list. So the invoiceId is null in this step yet (which is my question).</p>
  <p>There are many products in first table but why the output is empty?</p>
  <p><strong>Table products:</strong></p>
  <blockquote>
  <p>id   |   price</p>
  </blockquote>
  <p><strong>Table orders:</strong></p>
  <blockquote>
  <p>id   |   ProductId    |    member   |   invoiceId</p>
  </blockquote>
  <p>(I added <code>orders.member is null</code> regarding to <a href="https://stackoverflow.com/questions/28039591/sql-left-join-returns">this question</a> but no chance yet):</p>
  <pre><code>Select * from products left join orders 
  on products.id=orders.productId 
  where (orders.member='&quot;&amp;request.cookies(&quot;member&quot;)&amp;&quot;' or  orders.member is null) 
  and orders.invoiceId is null
  </code></pre>
  <p><strong>Edit:</strong>
  My Guess: There are also orders of other members. Does they violate current <strong>where condition</strong>?</p>