Created
March 4, 2016 13:27
-
-
Save pix-art/99c565a59f5ce6ecaa2d to your computer and use it in GitHub Desktop.
QB Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$query = $this->em->getConnection()->createQueryBuilder() | |
->select('a.*') | |
->from('asset', 'a'); | |
if ($type) { | |
$query->andWhere('a.type = :type') | |
->setParameter('type', $type); | |
} | |
$assets = $query->execute()->fetchAll(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment