title: zend framework where statement in query
body: <p>How can I use And/or in mysql queries using php and zend framework.for now I am using this :</p>
  
  <pre><code>    $db=Zend_Db_Table::getDefaultAdapter();
      $select=new Zend_Db_Select($db);
      $select-&gt;from('users','*');
      $select-&gt;joinInner('rest', 'users.repository = rest.id',array('username'));
      $select-&gt;where('username='.$rest.' and sold=0');
      return $db-&gt;fetchAll($select);
  </code></pre>
  
  <p>is that the correct way ? if not what is the correct way?</p>