Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hrshadhin/540b9a6fb3a91e92fde8ab004d290cdd to your computer and use it in GitHub Desktop.
Save hrshadhin/540b9a6fb3a91e92fde8ab004d290cdd to your computer and use it in GitHub Desktop.
symfomy2 custom query builder
<?php
$repository = $this->getDoctrine()->getManager()->getRepository('ApplicationBundle:AccWorkloadEntry');
$query = $repository->createQueryBuilder('c')->where("c.companyId = ".$this->CompanyID);
$query->andWhere("c.status ='1'");
$query->andWhere("c.reportDate between '".$dateFrom ."' and '".$dateTo."'");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment