title: Doctrine DQL Date as parameter problem
body: <p>Hi there I got a DQL that works (I get all my event since the beginning) :</p>
  
  <pre><code>DoctrineHelper::getEntityManager()-&gt;createQueryBuilder()
      -&gt;select("u.surname, count(u.surname) as total")
      -&gt;from("User", "u")
      -&gt;from("AbstractEvent", "e")
      -&gt;from("Attendance", "a")
      -&gt;where("u = a.attendee")
      -&gt;andWhere("e = a.event")
      -&gt;andWhere("a.status=1")
      -&gt;andWhere("e.date&lt;CURRENT_TIMESTAMP()")
      -&gt;groupBy("u.email")
      -&gt;orderBy("total","desc");
  </code></pre>
  
  <p>But this one doesn't (I would like only this month event):</p>
  
  <pre><code>DoctrineHelper::getEntityManager()-&gt;createQueryBuilder()
      -&gt;select("u.surname, count(u.surname) as total")
      -&gt;from("User", "u")
      -&gt;from("AbstractEvent", "e")
      -&gt;from("Attendance", "a")
      -&gt;where("u = a.attendee")
      -&gt;andWhere("e = a.event")
      -&gt;andWhere("a.status=1")
      -&gt;andWhere("e.date&lt;CURRENT_TIMESTAMP()")
      -&gt;andWhere("e.date&gt;?", date('Y-m-d 00:00:00', strtotime('-'.(date('j')-1).' day')) )
      -&gt;groupBy("u.email")
      -&gt;orderBy("total","desc");
  </code></pre>
  
  <p>My error.log has this line :</p>
  
  <pre><code> #0 /var/www/Doctrine/ORM/Query/AST/InputParameter.php(46): Doctrine\\ORM\\Query\\QueryException::invalidParameterFormat('?')
  </code></pre>
  
  <p>A print_r of the date gives me : 2011-08-01 00:00:00 which is correct.</p>
  
  <p>Here is the mapping for date:</p>
  
  <pre><code>/**
       * Date of the event.
       * @Column(type="datetime")
       */
      private $date;
  </code></pre>
  
  <p>Any help appreciated thanks !</p>