getValue(' SELECT COUNT(p.`id_sale`) FROM `ps_privatesale` p WHERE CAST(p.`date_start` AS DATE) = CAST(NOW() AS DATE) AND `date_end` > NOW() '); if($nb_sales>0) { Sale::sortActiveSaleAfterAdd($nb_sales); }