mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
add "order by" clause for person search
Results are now ordered by lastName, first name (alphabetical) refs #223
This commit is contained in:
parent
ff3479983e
commit
17fa1baedd
@ -99,7 +99,8 @@ class PersonSearch extends AbstractSearch
|
|||||||
$dql = 'SELECT p FROM ChillPersonBundle:Person p'
|
$dql = 'SELECT p FROM ChillPersonBundle:Person p'
|
||||||
. ' WHERE'
|
. ' WHERE'
|
||||||
. ' LOWER(p.firstName) like LOWER(:q)'
|
. ' LOWER(p.firstName) like LOWER(:q)'
|
||||||
. ' OR LOWER(p.lastName) like LOWER(:q)';
|
. ' OR LOWER(p.lastName) like LOWER(:q)'
|
||||||
|
. 'ORDER BY p.lastName, p.firstName';
|
||||||
|
|
||||||
$query = $this->om->createQuery($dql)
|
$query = $this->om->createQuery($dql)
|
||||||
->setParameter('q', '%'.trim($pattern).'%')
|
->setParameter('q', '%'.trim($pattern).'%')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user