#13594 Fixed Free search in the Manage agents view
This commit is contained in:
parent
ed5ddc1799
commit
382013fbe6
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue