title: PHP ("SELECT * FROM Table WHERE ... AND ...")
body: <p>Is it possible to query a table twice/filter a table twice? </p>
  
  <p>For example, I want to filter down the results so that the results I have left show everything from my table where one column is equal to 'MAN' and the other is a time that is greater than '12:00:00'. I have been doing this but it isn't working, as follows:</p>
  
  <pre class="lang-php prettyprint-override"><code>if($result = $db-&gt;query("SELECT * FROM TBLFlight WHERE IATADep = 'MAN' AND SchDep &gt; '12:00:00';")){
      if($result-&gt;num_rows){
          while($row = $result-&gt;fetch_object()){
              echo $row-&gt;FlightID, '&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;', $row-&gt;FlightNum, '&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;', $row-&gt;IATADep , '&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;', $row-&gt;IARAArr , '&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;', $row-&gt;SchDep , '&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;', $row-&gt;SchArr , '&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;', $row-&gt;Comments ,'&lt;br /&gt;';
          }
          $result-&gt;free();
      }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/sxGnh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sxGnh.png" alt="enter image description here"></a></p>