You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '8,18,19,20,21,22,23,24) and ticlock = '0' and date<'2021-08-04 06:22:35'' at line 1