title: Specific WHERE clause
body: <p>I can't figure this one out.</p>
  
  <p><code>$sql = "SELECT id,goodtill FROM table WHERE id = '$id' ORDER BY id LIMIT 1";</code></p>
  
  <p>However, I want to make sure that when that <code>$id</code> is <code>100</code> its <code>goodtill</code> in the database is <code>&gt; '0'</code>. </p>
  
  <p>There are several <code>$id's</code> that are <code>100</code>. Some of them have <code>goodtill &gt; '0'</code> and some them have <code>goodtill = '0'</code>. I only want to show the ones that have <code>goodtill &gt; '0'</code> And of course I want all other <code>$id's</code> that are not <code>100</code> to show.</p>
  
  <p>I tried <code>WHERE id = '$id OR ($id = '100' AND goodtill &gt; '0')</code> but I am pretty sure it's not how it's done, since it din't do what I wanted it to do.</p>