Skip to content

Commit

Permalink
getListOfProductsOrServices() filters are broken
Browse files Browse the repository at this point in the history
  • Loading branch information
ParisLiakos committed Nov 13, 2015
1 parent 88356e2 commit 298a671
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions htdocs/webservices/server_productorservice.php
Expand Up @@ -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)
Expand Down

0 comments on commit 298a671

Please sign in to comment.