From ae8c33eca76fc539e27d79f5b30b46cfcf1aac16 Mon Sep 17 00:00:00 2001 From: Thomas Mudrunka Date: Thu, 1 Dec 2011 15:54:24 +0100 Subject: [PATCH] API s cenikem je nyni komplexnejsi (a ma kratsi kod :-) --- apis/price-list.inc.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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)); -- 2.30.2