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 'and status = 1 order by outdatum desc, outtime desc limit 0, 10' at line 1

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 'order by timestamp desc limit 0, 3' at line 1

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 'and kind = 'gallery' order by creationstime' at line 1

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 'order by medaldate' at line 1