From: Thomas Mudrunka Date: Thu, 1 Dec 2011 14:54:24 +0000 (+0100) Subject: API s cenikem je nyni komplexnejsi (a ma kratsi kod :-) X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=ae8c33eca76fc539e27d79f5b30b46cfcf1aac16;p=mirrors%2FSokoMan.git API s cenikem je nyni komplexnejsi (a ma kratsi kod :-) --- diff --git a/apis/price-list.inc.php b/apis/price-list.inc.php index cc80af2..b0442e6 100644 --- a/apis/price-list.inc.php +++ b/apis/price-list.inc.php @@ -1,5 +1,6 @@ 0 AND category_id > 0'; +$sql = 'SELECT model_name,model_price_out,producer_name'. + ' FROM model LEFT JOIN producer USING(producer_id)'. + ' WHERE model_price_out > 0 AND category_id > 0'; $result = $this->db->safe_query_fetch($sql); -foreach($result as $item) $items[$item['model_name']]=$item['model_price_out']; -die(json_encode($items)); +die(json_encode($result));