Skip to content

Instantly share code, notes, and snippets.

@rileyrg
Created May 25, 2017 12:50
Show Gist options
  • Save rileyrg/8052a19fce404d45aa58125a6ff3a25c to your computer and use it in GitHub Desktop.
Save rileyrg/8052a19fce404d45aa58125a6ff3a25c to your computer and use it in GitHub Desktop.
if (sizeof($eyeColours) == 1) {
$queryBuilder->where("e.name = ?0");
} else {
/***
foreach ($eyeColours as $key => $value) {
}
***/
$queryBuilder->where($queryBuilder->expr()->orX(
$queryBuilder->expr()->eq("e.name", "?0"),
$queryBuilder->expr()->eq("e.name", "?1")
));
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment