$query = $this->joinRelations($query) ; | $query = $this->joinRelations($query) ; | ||||
$query->andWhere('e.status = 1'); | $query->andWhere('e.status = 1'); | ||||
$query->andWhere('e.title LIKE :terms'); | |||||
$query->andWhere('e.title LIKE :terms OR cat.title LIKE :terms'); | |||||
$query->setParameter(':terms', '%'.$terms.'%') ; | $query->setParameter(':terms', '%'.$terms.'%') ; | ||||
$query->groupBy('e.id') ; | |||||
if($maxResults) { | if($maxResults) { | ||||
$query->setMaxResults($maxResults) ; | $query->setMaxResults($maxResults) ; | ||||
} | } |