#0 DataBase->query(
SELECT *
FROM promo
WHERE `id` = AND (DATEDIFF(`end`,`start`) = 59 || DATEDIFF(`end`,`start`) = 46 || DATEDIFF(`end`,`start`) = 60 || DATEDIFF(`end`,`start`) = 45 || DATEDIFF(`end`,`start`) = 61 || DATEDIFF(`end`,`start`) = 62 || DATEDIFF(`end`,`start`) = 1 || DATEDIFF(`end`,`start`) = 43 || DATEDIFF(`end`,`start`) = 50 || DATEDIFF(`end`,`start`) = 38)
ORDER BY quantity ASC) called at [/home/admin/public_html/client.perfectbg.net/classes/ProductClass.php:3253]
#1 Product->getPromotion() called at [/home/admin/public_html/client.perfectbg.net/ajax/ajaxChangePicture.php:47]
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND (DATEDIFF(`end`,`start`) = 59 || DATEDIFF(`end`,`start`) = 46 || DATEDIFF(`e' at line 3
statement:
SELECT *
FROM promo
WHERE `id` = AND (DATEDIFF(`end`,`start`) = 59 || DATEDIFF(`end`,`start`) = 46 || DATEDIFF(`end`,`start`) = 60 || DATEDIFF(`end`,`start`) = 45 || DATEDIFF(`end`,`start`) = 61 || DATEDIFF(`end`,`start`) = 62 || DATEDIFF(`end`,`start`) = 1 || DATEDIFF(`end`,`start`) = 43 || DATEDIFF(`end`,`start`) = 50 || DATEDIFF(`end`,`start`) = 38)
ORDER BY quantity ASC