Skip to content
Snippets Groups Projects
Commit 653fb00a authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge pull request #3981 from ParisLiakos/develop

getListOfProductsOrServices() filters are broken
parents 3ff42a45 298a6713
No related branches found
No related tags found
No related merge requests found
......@@ -946,9 +946,9 @@ function getListOfProductsOrServices($authentication,$filterproduct)
$sql.=" WHERE entity=".$conf->entity;
foreach($filterproduct as $key => $val)
{
if ($key == 'type' && $val >= 0) $sql.=" AND fk_product_type = ".$db->escape($val);
if ($key == 'tosell') $sql.=" AND to_sell = ".$db->escape($val);
if ($key == 'tobuy') $sql.=" AND to_buy = ".$db->escape($val);
if ($key == 'type' && $val >= 0) $sql.=" AND fk_product_type = ".$db->escape($val);
if ($key == 'status_tosell') $sql.=" AND tosell = ".$db->escape($val);
if ($key == 'status_tobuy') $sql.=" AND tobuy = ".$db->escape($val);
}
$resql=$db->query($sql);
if ($resql)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment