Skip to content

Instantly share code, notes, and snippets.

@codecowboy
Created September 1, 2011 16:06
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 codecowboy/1186513 to your computer and use it in GitHub Desktop.
Save codecowboy/1186513 to your computer and use it in GitHub Desktop.
Array result
$query = $this->getEntityManager()->createQuery('
SELECT COUNT(s) FROM GymloopDiaryBundle:TrainingSession s
WHERE s.status = :completed
AND s.user = :user')
->setParameter('user',$user)
->setParameter('completed','confirmed');
$result = $query->getResult();
array(1) { [0]=> array(1) { [1]=> string(1) "0" } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment