mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-08-03 15:11:40 +00:00
Merge c79986f758 into 4ef1d27356
This commit is contained in:
commit
6aad0191ce
1 changed files with 2 additions and 1 deletions
|
|
@ -235,7 +235,8 @@ class StructuralDBElementRepository extends AttachmentContainingDBElementReposit
|
|||
$qb = $this->createQueryBuilder('e');
|
||||
//Use lowercase conversion to be case-insensitive
|
||||
$qb->where($qb->expr()->like('LOWER(e.alternative_names)', 'LOWER(:name)'));
|
||||
$qb->setParameter('name', '%'.$name.',%');
|
||||
//Replace commas in the name with wildcard to match any placeholder character
|
||||
$qb->setParameter('name', '%'.str_replace(',', '_', $name).',%');
|
||||
|
||||
$result = $qb->getQuery()->getResult();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue