title: Anyone know a good OOP PHP MySQL class? To build queries primarily
body: <p>EDIT: Found this which works quite well for what I need: <a href="https://github.com/jstayton/QueryBuilder" rel="nofollow">https://github.com/jstayton/QueryBuilder</a></p>
  
  <p>I'm building a small project where I need to query a table a couple of times. </p>
  
  <p>It works like this:</p>
  
  <pre><code>1) Multi-select box of distinct items in Column 1
  2) Ajax query the db for distinct records in Column 2 where Column 1 IN (vals
     previously selected)
  3) Does this 3-4 more times, gradually cutting down the available options by 
     adding IN statements to the MySQL
  </code></pre>
  
  <p>Now it's not impossible to this manually by setting up a couple pre-built queries and binding the various params to them, but I'd like to make it a bit nicer than that. Something along the lines of....</p>
  
  <pre><code>$qry-&gt;from("mytable");
  $qry-&gt;column("col1");
  $qry-&gt;column("col2");
  $qry-&gt;addWhere("col1", "in", $arrayOfVals);
  $qry-&gt;addWhere("col2", "in", $arrayOfVals2);
  </code></pre>
  
  <p>Or something to that effect, that will build it out in a cleaner way.</p>
  
  <p>Alternatively, if someone has a suggestion on a different way to do this, I'm open to that too.</p>