Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /var/www/tutete_pro/tienda/includes/functions/database.php on line 46
1525 - Incorrect DATETIME value: '0000-00-00 00:00:00'

SELECT P.manufacturers_id, M.manufacturers_name, COUNT(P.products_id) AS cantidad_productos, ROUND((1 - s.specials_new_products_price / P.products_price_text) * 100, -1) AS descuento FROM products P INNER JOIN products_to_categories P2C ON P2C.products_id = P.products_id LEFT JOIN manufacturers M ON M.manufacturers_id = P.manufacturers_id INNER JOIN products_description PD ON PD.language_id = '15' AND PD.products_id = P.products_id LEFT JOIN specials s ON P.products_id = s.products_id AND s.status=1 AND (s.expires_date>now() OR s.expires_date='0000-00-00 00:00:00') AND s.es_vip = 0 WHERE P2C.categories_id = '651' AND P.products_status = 1 AND PD.publicar = 1 GROUP BY descuento HAVING descuento IS NOT NULL ORDER by descuento ASC

[TEP STOP]