From 298a67134241ea6fe9f20cd4d2cf86238256e410 Mon Sep 17 00:00:00 2001 From: Paris Liakos Date: Fri, 13 Nov 2015 20:25:12 +0200 Subject: [PATCH] getListOfProductsOrServices() filters are broken --- htdocs/webservices/server_productorservice.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/webservices/server_productorservice.php b/htdocs/webservices/server_productorservice.php index 9d26ce52fb2..2e3314fff12 100644 --- a/htdocs/webservices/server_productorservice.php +++ b/htdocs/webservices/server_productorservice.php @@ -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)