getValue(' SELECT MIN(`id_product`) FROM `'._DB_PREFIX_.'product` WHERE `date_add` > DATE_SUB(NOW(), INTERVAL 10 DAY) '); Db::getInstance()->ExecuteS(' DELETE FROM `'._DB_PREFIX_.'product_ps_cache` WHERE `id_product` >= '.$min_id_product.' '); Db::getInstance()->ExecuteS(' INSERT IGNORE INTO `'._DB_PREFIX_.'product_ps_cache` ( SELECT p.id_product, IFNULL( ( SELECT s.id_sale FROM `'._DB_PREFIX_.'privatesale_category` s WHERE s.`id_category` = p.`id_category_default` LIMIT 1) , 0 ) FROM `'._DB_PREFIX_.'product` p WHERE p.`id_product` >= '.$min_id_product.' ) ');