// lower memory usage for SpecificPrice::getProductIdByDate
This commit is contained in:
@@ -345,7 +345,7 @@ class SpecificPriceCore extends ObjectModel
|
||||
if (!SpecificPrice::isFeatureActive())
|
||||
return array();
|
||||
|
||||
$results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT `id_product`, `id_product_attribute`
|
||||
FROM `'._DB_PREFIX_.'specific_price`
|
||||
WHERE `id_shop` IN(0, '.(int)$id_shop.') AND
|
||||
@@ -361,9 +361,9 @@ class SpecificPriceCore extends ObjectModel
|
||||
)
|
||||
AND
|
||||
`reduction` > 0
|
||||
');
|
||||
', false);
|
||||
$ids_product = array();
|
||||
foreach ($results as $row)
|
||||
while ($row = Db::getInstance()->nextRow($result))
|
||||
$ids_product[] = $with_combination_id ? array('id_product' => (int)$row['id_product'], 'id_product_attribute' => (int)$row['id_product_attribute']) : (int)$row['id_product'];
|
||||
return $ids_product;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user