From b74c003c39d44c3a3ba8d845e73e66a0e937fd17 Mon Sep 17 00:00:00 2001 From: mMarinetti Date: Tue, 20 Dec 2011 22:39:11 +0000 Subject: [PATCH] // class Shop optimization in sql request git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11443 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/shop/Shop.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/classes/shop/Shop.php b/classes/shop/Shop.php index 2fcde7d3e..e51562d33 100644 --- a/classes/shop/Shop.php +++ b/classes/shop/Shop.php @@ -185,7 +185,7 @@ class ShopCore extends ObjectModel { $has_dependency = false; $nbr_customer = (int)Db::getInstance()->getValue(' - SELECT `id_customer` + SELECT count(*) FROM `'._DB_PREFIX_.'customer` WHERE `id_shop`='.(int)$id_shop ); @@ -194,7 +194,7 @@ class ShopCore extends ObjectModel else { $nbr_order = (int)Db::getInstance()->getValue(' - SELECT `id_order` + SELECT count(*) FROM `'._DB_PREFIX_.'orders` WHERE `id_shop`='.(int)$id_shop ); @@ -351,7 +351,7 @@ class ShopCore extends ObjectModel { if (!$this->domain) return false; - return 'http://'.$this->domain.$this->physical_uri.$this->virtual_uri; + return 'http://'.$this->domain.$this->getBaseURI(); } /**