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 isCancelled = 0' at line 6CHECK THE URL => SELECT COUNT(*) AS nb
FROM t_reservations
WHERE date = {d '2019-05-25'}
AND periode = '0'
AND studios_fk =
AND isCancelled = 0