Something is wrong in your syntax obok '2 AND (v_products.endTime > '2019-22-08 03:14:12' OR v_products.endTime = '0000-' w linii 3