Fix: for avoid sql errors with predefined export models
This commit is contained in:
parent
55856bdc36
commit
d6c18c1789
@ -227,18 +227,19 @@ 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)
|
||||||
{
|
{
|
||||||
$sqlWhere.=" and ".$this->build_filterQuery($this->array_export_TypeFields[0][$key], $key, $array_filterValue[$key]);
|
if (!empty($value))
|
||||||
|
$sqlWhere.=" and ".$this->build_filterQuery($this->array_export_TypeFields[0][$key], $key, $array_filterValue[$key]);
|
||||||
}
|
}
|
||||||
$sql.=$sqlWhere;
|
$sql.=$sqlWhere;
|
||||||
}
|
}
|
||||||
$sql.=$this->array_export_sql_order[$indice];
|
$sql.=$this->array_export_sql_order[$indice];
|
||||||
|
|
||||||
return $sql;
|
return $sql;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user