Notice: Trying to get property of non-object in /home/domains/cd.cz/tv/Application/Controllers/IndexController.php on line 26

Fatal error: Uncaught exception 'Zend_Db_Statement_Mysqli_Exception' with message 'Mysqli prepare error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND viewed='1' ORDER BY date DESC' at line 1' in /home/domains/cd.cz/tv/Library/Zend/Db/Statement/Mysqli.php:84 Stack trace: #0 /home/domains/cd.cz/tv/Library/Zend/Db/Statement.php(109): Zend_Db_Statement_Mysqli->_prepare('SELECT id,short...') #1 /home/domains/cd.cz/tv/Library/Zend/Db/Adapter/Mysqli.php(350): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), 'SELECT id,short...') #2 /home/domains/cd.cz/tv/Library/Zend/Db/Adapter/Abstract.php(429): Zend_Db_Adapter_Mysqli->prepare('SELECT id,short...') #3 /home/domains/cd.cz/tv/Library/Zend/Db/Adapter/Abstract.php(641): Zend_Db_Adapter_Abstract->query('SELECT id,short...', Array) #4 /home/domains/cd.cz/tv/Application/Controllers/IndexController.php(35): Zend_Db_Adapter_Abstract->fetchAll('SELECT id,short...') #5 /home/domains in /home/domains/cd.cz/tv/Library/Zend/Db/Statement/Mysqli.php on line 84