Skip to content
Snippets Groups Projects
Commit d6c18c17 authored by Regis Houssin's avatar Regis Houssin
Browse files

Fix: for avoid sql errors with predefined export models

parent 55856bdc
Branches
No related tags found
No related merge requests found
...@@ -227,12 +227,13 @@ class Export ...@@ -227,12 +227,13 @@ class Export
$sql.=$this->array_export_sql_end[$indice]; $sql.=$this->array_export_sql_end[$indice];
//construction du filtrage si le parametrage existe //construction du filtrage si le parametrage existe
if (is_array($array_filterValue)) if (is_array($array_filterValue) && !empty($array_filterValue))
{ {
$sqlWhere=''; $sqlWhere='';
// pour ne pas a gerer le nombre de condition // pour ne pas a gerer le nombre de condition
foreach ($array_filterValue as $key => $value) foreach ($array_filterValue as $key => $value)
{ {
if (!empty($value))
$sqlWhere.=" and ".$this->build_filterQuery($this->array_export_TypeFields[0][$key], $key, $array_filterValue[$key]); $sqlWhere.=" and ".$this->build_filterQuery($this->array_export_TypeFields[0][$key], $key, $array_filterValue[$key]);
} }
$sql.=$sqlWhere; $sql.=$sqlWhere;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment