exception 'PDOException' with message '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 p.`IDtyp`=6
AND l.widoczna=1
ORDER BY p.pozycj' at line 5' in /home/pckompleks/ftp/product/library/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /home/pckompleks/ftp/product/library/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /home/pckompleks/ftp/product/library/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#2 /home/pckompleks/ftp/product/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /home/pckompleks/ftp/product/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT p.*,l.ty...', Array)
#4 /home/pckompleks/ftp/product/application/Model/Pliki.php(52): Zend_Db_Adapter_Pdo_Abstract->query('SELECT p.*,l.ty...')
#5 /home/pckompleks/ftp/product/application/views/tpl/pliki/galeria.phtml(6): Model_Pliki->fetchAll()
#6 /home/pckompleks/ftp/product/library/Zend/View.php(108): include('/home/pckomplek...')
#7 /home/pckompleks/ftp/product/library/Zend/View/Abstract.php(880): Zend_View->_run('application/vie...')
#8 /home/pckompleks/ftp/product/library/Zend/View/Helper/Partial.php(105): Zend_View_Abstract->render('tpl/pliki/galer...')
#9 [internal function]: Zend_View_Helper_Partial->partial('tpl/pliki/galer...', Array)
#10 /home/pckompleks/ftp/product/library/Zend/View/Abstract.php(342): call_user_func_array(Array, Array)
#11 /home/pckompleks/ftp/product/application/views/content/c4.phtml(24): Zend_View_Abstract->__call('partial', Array)
#12 /home/pckompleks/ftp/product/application/views/content/c4.phtml(24): Zend_View->partial('tpl/pliki/galer...', Array)
#13 /home/pckompleks/ftp/product/library/Zend/View.php(108): include('/home/pckomplek...')
#14 /home/pckompleks/ftp/product/library/Zend/View/Abstract.php(880): Zend_View->_run('application/vie...')
#15 /home/pckompleks/ftp/product/library/Zend/Controller/Action/Helper/ViewRenderer.php(897): Zend_View_Abstract->render('content/c4.phtm...')
#16 /home/pckompleks/ftp/product/library/Zend/Controller/Action/Helper/ViewRenderer.php(918): Zend_Controller_Action_Helper_ViewRenderer->renderScript('content/c4.phtm...', NULL)
#17 /home/pckompleks/ftp/product/library/Zend/Controller/Action/Helper/ViewRenderer.php(957): Zend_Controller_Action_Helper_ViewRenderer->render()
#18 /home/pckompleks/ftp/product/library/Zend/Controller/Action/HelperBroker.php(277): Zend_Controller_Action_Helper_ViewRenderer->postDispatch()
#19 /home/pckompleks/ftp/product/library/Zend/Controller/Action.php(523): Zend_Controller_Action_HelperBroker->notifyPostDispatch()
#20 /home/pckompleks/ftp/product/library/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('c4Action')
#21 /home/pckompleks/ftp/product/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#22 /home/pckompleks/ftp/product/index.php(94): Zend_Controller_Front->dispatch()
#23 {main}

Next exception 'Zend_Db_Statement_Exception' with message '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 p.`IDtyp`=6
AND l.widoczna=1
ORDER BY p.pozycj' at line 5' in /home/pckompleks/ftp/product/library/Zend/Db/Statement/Pdo.php:234
Stack trace:
#0 /home/pckompleks/ftp/product/library/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/pckompleks/ftp/product/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/pckompleks/ftp/product/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT p.*,l.ty...', Array)
#3 /home/pckompleks/ftp/product/application/Model/Pliki.php(52): Zend_Db_Adapter_Pdo_Abstract->query('SELECT p.*,l.ty...')
#4 /home/pckompleks/ftp/product/application/views/tpl/pliki/galeria.phtml(6): Model_Pliki->fetchAll()
#5 /home/pckompleks/ftp/product/library/Zend/View.php(108): include('/home/pckomplek...')
#6 /home/pckompleks/ftp/product/library/Zend/View/Abstract.php(880): Zend_View->_run('application/vie...')
#7 /home/pckompleks/ftp/product/library/Zend/View/Helper/Partial.php(105): Zend_View_Abstract->render('tpl/pliki/galer...')
#8 [internal function]: Zend_View_Helper_Partial->partial('tpl/pliki/galer...', Array)
#9 /home/pckompleks/ftp/product/library/Zend/View/Abstract.php(342): call_user_func_array(Array, Array)
#10 /home/pckompleks/ftp/product/application/views/content/c4.phtml(24): Zend_View_Abstract->__call('partial', Array)
#11 /home/pckompleks/ftp/product/application/views/content/c4.phtml(24): Zend_View->partial('tpl/pliki/galer...', Array)
#12 /home/pckompleks/ftp/product/library/Zend/View.php(108): include('/home/pckomplek...')
#13 /home/pckompleks/ftp/product/library/Zend/View/Abstract.php(880): Zend_View->_run('application/vie...')
#14 /home/pckompleks/ftp/product/library/Zend/Controller/Action/Helper/ViewRenderer.php(897): Zend_View_Abstract->render('content/c4.phtm...')
#15 /home/pckompleks/ftp/product/library/Zend/Controller/Action/Helper/ViewRenderer.php(918): Zend_Controller_Action_Helper_ViewRenderer->renderScript('content/c4.phtm...', NULL)
#16 /home/pckompleks/ftp/product/library/Zend/Controller/Action/Helper/ViewRenderer.php(957): Zend_Controller_Action_Helper_ViewRenderer->render()
#17 /home/pckompleks/ftp/product/library/Zend/Controller/Action/HelperBroker.php(277): Zend_Controller_Action_Helper_ViewRenderer->postDispatch()
#18 /home/pckompleks/ftp/product/library/Zend/Controller/Action.php(523): Zend_Controller_Action_HelperBroker->notifyPostDispatch()
#19 /home/pckompleks/ftp/product/library/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('c4Action')
#20 /home/pckompleks/ftp/product/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#21 /home/pckompleks/ftp/product/index.php(94): Zend_Controller_Front->dispatch()
#22 {main}