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 '&& tdate > "1970-01-01" ORDER BY tdate ASC' at line 1 7