Commit 058e1316 authored by Andreas Heimann's avatar Andreas Heimann

changed search order

parent 2fb0921f
......@@ -141,12 +141,12 @@ class APIDiscoveryController extends AbstractController
// Songs
$resultsSongs = $em->getRepository(Song::class)->createQueryBuilder('o')
->where('o.publicationStatus IN (0, 1)')
->andWhere('o.title LIKE :query')
->where('o.title LIKE :query')
->orWhere('o.subtitle LIKE :query')
->orWhere('o.tags LIKE :query')
->orWhere('o.artist LIKE :query')
->orWhere('o.charter LIKE :query')
->andWhere('o.publicationStatus IN (0, 1)')
->orderBy('o.id', 'DESC')
->setParameter('query', '%'.$searchQuery.'%')
->getQuery()
......
......@@ -41,12 +41,12 @@ class SearchController extends AbstractController
$resultsSongs = $em->getRepository(Song::class)->createQueryBuilder('o')
->where('o.publicationStatus IN (0, 1)')
->andWhere('o.title LIKE :query')
->where('o.title LIKE :query')
->orWhere('o.subtitle LIKE :query')
->orWhere('o.tags LIKE :query')
->orWhere('o.artist LIKE :query')
->orWhere('o.charter LIKE :query')
->andWhere('o.publicationStatus IN (0, 1)')
->orderBy('o.id', 'DESC')
->setParameter('query', '%'.$searchQuery.'%')
->getQuery()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment