Skip to content

Instantly share code, notes, and snippets.

@hidenorigoto
Created August 7, 2011 12:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hidenorigoto/1130338 to your computer and use it in GitHub Desktop.
Save hidenorigoto/1130338 to your computer and use it in GitHub Desktop.
Query Example (Doctrine2 QueryBuilder)
$qb = $em->createQueryBuilder();
$qb->select('p')
->from('AcmeTestBundle:Post', 'p')
->where('p.order_date < :targetDate')
->setParameters(array(
'targetDate' => new \DateTime('2011-08-07'),
));
$q = $qb->getQuery();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment