Fix: We must not use strtolower. Case sensitive search or not must be

managed by the LIKE or LIKE BINARY into request (this make code
portable on other database with the database driver and this avoid
errors of strtolower when using non latin characters).
This commit is contained in:
Laurent Destailleur
2012-10-22 12:13:24 +02:00
parent ad20ae8c7f
commit 58eb02274f

View File

@@ -117,10 +117,10 @@ if ($catid > 0) $sql.= " AND cs.fk_categorie = ".$catid;
if ($catid == -2) $sql.= " AND cs.fk_categorie IS NULL";
if ($search_categ > 0) $sql.= " AND cs.fk_categorie = ".$search_categ;
if ($search_categ == -2) $sql.= " AND cs.fk_categorie IS NULL";
if ($search_nom) $sql.= " AND s.nom LIKE '%".$db->escape(strtolower($search_nom))."%'";
if ($search_zipcode) $sql.= " AND s.cp LIKE '%".$db->escape(strtolower($search_zipcode))."%'";
if ($search_ville) $sql.= " AND s.ville LIKE '%".$db->escape(strtolower($search_ville))."%'";
if ($search_code) $sql.= " AND s.code_client LIKE '%".$db->escape(strtolower($search_code))."%'";
if ($search_nom) $sql.= " AND s.nom LIKE '%".$db->escape($search_nom)."%'";
if ($search_zipcode) $sql.= " AND s.cp LIKE '%".$db->escape($search_zipcode)."%'";
if ($search_ville) $sql.= " AND s.ville LIKE '%".$db->escape($search_ville)."%'";
if ($search_code) $sql.= " AND s.code_client LIKE '%".$db->escape($search_code)."%'";
if ($search_compta) $sql.= " AND s.code_compta LIKE '%".$db->escape($search_compta)."%'";
// Insert sale filter
if ($search_sale)