Merge branch '33-buscador-en-gestion-de-agentes-es-case-sensitive-integria-4398' into 'develop'

Make agent manager search bar case insensitive - #33

See merge request !90
This commit is contained in:
Enrique Camargo 2017-01-31 11:44:36 +01:00
commit 375bea910a
1 changed files with 4 additions and 4 deletions

View File

@ -282,8 +282,8 @@ if ($search != "") {
$id = db_get_all_rows_sql($sql);
if($id != ''){
$aux = $id[0]['id_agent'];
$search_sql = " AND ( nombre " . $order_collation . "
LIKE '%$search%' OR tagente.id_agente = $aux";
$search_sql = " AND ( LOWER(nombre) " . $order_collation . "
LIKE LOWER('%$search%') OR tagente.id_agente = $aux";
if(count($id)>=2){
for ($i = 1; $i < count($id); $i++){
$aux = $id[$i]['id_agent'];
@ -292,8 +292,8 @@ if ($search != "") {
}
$search_sql .= ")";
}else{
$search_sql = " AND ( nombre " . $order_collation . "
LIKE '%$search%') ";
$search_sql = " AND ( LOWER(nombre) " . $order_collation . "
LIKE LOWER('%$search%')) ";
}
}