title: How to remove specific dql part in a doctrine Doctrine_RawSql query?
body: <p>i have read this</p>
  
  <p><a href="https://stackoverflow.com/questions/1567652/doctrine-how-to-remove-part-of-a-where-clause-from-select-query-inside-listener">Doctrine: How to remove part of a where clause from select query inside listener (preDqlSelect)?</a></p>
  
  <p>but, i still cant see how to remove specific part, this is not explicitly written, can some one explain me how ?</p>
  
  <p>a sample of my Doctrine_RawSql</p>
  
  <pre><code>$a = new Doctrine_RawSql();
  
              $a-&gt;select('{m.username}, {m.age}, {m.photo_principale_petit_format},{m.photo_principale_grand_format}')-&gt;              
                  from('(SELECT * FROM member_user where id &gt; ( SELECT max(id)-15000 as maximum FROM member_user)) as m')-&gt;
                  innerJoin('member_group_history as g ON m.id = g.member_user_id')-&gt;
                  where('g.old_member_group_id = ?', 7)-&gt;
                  andWhere('m.is_visible = ?', 1)-&gt;               
                  andWhere('m.sexe = ?', $this-&gt;getSexeRecherche())-&gt;             
                  andWhere('m.age &gt;= ?', $this-&gt;getMinAgeSearch())-&gt;
                  andWhere('m.age &lt;= ?', $this-&gt;getMaxAgeSearch())-&gt;      
                  andWhereIn('m.member_group_id', array(10,11))-&gt; 
                  andWhere('g.created_at &gt;= ?', date("Y-m-d H:i:s",strtotime("- 20 weeks")))-&gt;
                  andWhere('g.created_at &lt;= ?', date("Y-m-d H:i:s",strtotime("now")))-&gt;
                  limit($limit)-&gt;             
                  addComponent('m', 'MemberUser m');                          
  </code></pre>
  
  <p>in fact i just want to test if my query count return enough result, and remove specific predicates if not  .</p>