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 product_id < 5215
ORDER BY products.last_update_dt, product_id DESC LIMI' at line 5
SQL: SELECT product_id
FROM `product_categs`
INNER JOIN products ON products.id = product_categs.product_id
WHERE categ_id =
AND product_id < 5215
ORDER BY products.last_update_dt, product_id DESC LIMIT 1
Fatal error: Call to a member function fetchRow() on a non-object in /var/www/html/projets/teslogos/dev2/classes/db.class.php on line 67