Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 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 template_type = ''' at line 1 in /srv/hrtk/next/Zend/Db/Statement/Pdo.php:228 Stack trace: #0 /srv/hrtk/next/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array) #1 /srv/hrtk/next/Zend/Db/Statement.php(303): Zend_Db_Statement_Pdo->_execute(Array) #2 /srv/hrtk/next/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array) #3 /srv/hrtk/next/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT template...', Array) #4 /srv/hrtk/next/CMySQL.php(370): Zend_Db_Adapter_Pdo_Abstract->query('SELECT template...') #5 /var/www/conciliates/htdocs/generator.php(123): CMySQL->select('SELECT template...') #6 {main} Next Zend_Db_Statement_Exception: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that co in /srv/hrtk/next/Zend/Db/Statement/Pdo.php on line 235