Skip to content

Instantly share code, notes, and snippets.

@jblac
Created February 1, 2013 21:40
Show Gist options
  • Save jblac/4694348 to your computer and use it in GitHub Desktop.
Save jblac/4694348 to your computer and use it in GitHub Desktop.
$beg = date('Y-m-d 00:00:00', strtotime($beg)); //Fixed the bug
$fin = date('Y-m-d 23:59:59', strtotime($fin));
$dql = "SELECT DISTINCT(u.id) AS agent_id FROM EcsTimeclockBundle:TimeClock t
LEFT JOIN t.noteBy u WHERE t.daydate BETWEEN :beg AND :fin AND u.employeejob = :tpe";
$query = $this->em->createQuery($dql);
$query->setParameters(array('beg' => $beg, 'fin' => $fin, 'tpe' => $type));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment