// 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
This commit is contained in:
mMarinetti
2011-12-20 22:39:11 +00:00
parent e9f57535b5
commit b74c003c39
+3 -3
View File
@@ -185,7 +185,7 @@ class ShopCore extends ObjectModel
{ {
$has_dependency = false; $has_dependency = false;
$nbr_customer = (int)Db::getInstance()->getValue(' $nbr_customer = (int)Db::getInstance()->getValue('
SELECT `id_customer` SELECT count(*)
FROM `'._DB_PREFIX_.'customer` FROM `'._DB_PREFIX_.'customer`
WHERE `id_shop`='.(int)$id_shop WHERE `id_shop`='.(int)$id_shop
); );
@@ -194,7 +194,7 @@ class ShopCore extends ObjectModel
else else
{ {
$nbr_order = (int)Db::getInstance()->getValue(' $nbr_order = (int)Db::getInstance()->getValue('
SELECT `id_order` SELECT count(*)
FROM `'._DB_PREFIX_.'orders` FROM `'._DB_PREFIX_.'orders`
WHERE `id_shop`='.(int)$id_shop WHERE `id_shop`='.(int)$id_shop
); );
@@ -351,7 +351,7 @@ class ShopCore extends ObjectModel
{ {
if (!$this->domain) if (!$this->domain)
return false; return false;
return 'http://'.$this->domain.$this->physical_uri.$this->virtual_uri; return 'http://'.$this->domain.$this->getBaseURI();
} }
/** /**