#13594 Fixed Free search in the Manage agents view

This commit is contained in:
Jorge Rincon 2024-04-29 16:28:58 +02:00
parent ed5ddc1799
commit 382013fbe6
1 changed files with 8 additions and 8 deletions

View File

@ -566,10 +566,10 @@ if ($search != '') {
if ($id != '') {
$aux = $id[0]['id_agent'];
$search_sql = sprintf(
' AND ( REPLACE(nombre, " ", " ") LIKE "%%%s%%"
OR REPLACE(alias, " ", " ") LIKE "%%%s%%"
OR REPLACE(comentarios, " ", " ") LIKE "%%%s%%"
OR EXISTS (SELECT * FROM tagent_custom_data WHERE id_agent = id_agente AND REPLACE(description, " ", " ") LIKE "%%%s%%")
' AND ( nombre LIKE "%%%s%%"
OR alias, " ", " ") LIKE "%%%s%%"
OR comentarios, " ", " ") LIKE "%%%s%%"
OR EXISTS (SELECT * FROM tagent_custom_data WHERE id_agent = id_agente AND description, " ", " ") LIKE "%%%s%%")
OR tagente.id_agente = %d',
$search,
$search,
@ -591,10 +591,10 @@ if ($search != '') {
$search_sql .= ')';
} else {
$search_sql = sprintf(
' AND ( REPLACE(nombre, " ", " ")
LIKE "%%%s%%" OR REPLACE(alias, " ", " ")
LIKE "%%%s%%" OR REPLACE(comentarios, " ", " ") LIKE "%%%s%%"
OR EXISTS (SELECT * FROM tagent_custom_data WHERE id_agent = id_agente AND REPLACE(description, " ", " ") LIKE "%%%s%%"))',
' AND ( nombre
LIKE "%%%s%%" OR alias
LIKE "%%%s%%" OR comentarios LIKE "%%%s%%"
OR EXISTS (SELECT * FROM tagent_custom_data WHERE id_agent = id_agente AND description LIKE "%%%s%%"))',
$search,
$search,
$search,