Terminplan reisen

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 t_reise.rei_geloescht = 0 AND t_termine.ter_ausgebucht = 0 AND t_te...' at line 4