Remove COLLATE clause from LIKE operations
Removed COLLATE specification from Search() LIKE clauses to fix 'COLLATION latin1_swedish_ci is not valid for CHARACTER SET utf8mb4' error. Let MySQL use the table's default collation for LIKE comparisons.
This commit is contained in:
@@ -686,10 +686,10 @@ class Producto extends Main
|
||||
$sqlAdd .= ' AND p.prodCatId = "'.$this->prodCatId.'"';
|
||||
|
||||
if($this->descripcion)
|
||||
$sqlAdd .= ' AND p.modelo LIKE "%'.$this->descripcion.'%" COLLATE latin1_swedish_ci';
|
||||
$sqlAdd .= ' AND p.modelo LIKE "%'.$this->descripcion.'%"';
|
||||
|
||||
if($this->codigoBarra)
|
||||
$sqlAdd .= ' AND p.codigoBarra LIKE "%'.$this->codigoBarra.'%" COLLATE latin1_swedish_ci';
|
||||
$sqlAdd .= ' AND p.codigoBarra LIKE "%'.$this->codigoBarra.'%"';
|
||||
|
||||
if($sqlAdd != ''){
|
||||
|
||||
|
||||
Reference in New Issue
Block a user