an unexpected error occurred.

Unexpected Exception: SQLSTATE[42000]: Syntax error or access violation: 1064 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 is_showed=1 and zcshop_products.onsales=0) GROUP BY `zcshop_items`.`itemid` ' at line 5


#0 /home/gogoalsh/public_html/library/Zend/Db/Statement.php(283): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/gogoalsh/public_html/library/Zend/Db/Adapter/Abstract.php(430): Zend_Db_Statement->execute(Array)
#2 /home/gogoalsh/public_html/library/Zend/Db/Adapter/Pdo/Abstract.php(220): Zend_Db_Adapter_Abstract->query(Object(Zend_Db_Select), Array)
#3 /home/gogoalsh/public_html/library/Zend/Db/Adapter/Abstract.php(652): Zend_Db_Adapter_Pdo_Abstract->query(Object(Zend_Db_Select), Array)
#4 /home/gogoalsh/public_html/models/shop/CItemShow.php(259): Zend_Db_Adapter_Abstract->fetchAll(Object(Zend_Db_Select))
#5 /home/gogoalsh/public_html/application/shop/controllers/PromotionController.php(585): CItemShow->getAllItems()
#6 /home/gogoalsh/public_html/library/Zend/Controller/Action.php(502): PromotionController->crawldetailAction()
#7 /home/gogoalsh/public_html/library/Zend/Controller/Dispatcher/Standard.php(293): Zend_Controller_Action->dispatch('crawldetailActi...')
#8 /home/gogoalsh/public_html/library/Zend/Controller/Front.php(946): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#9 /home/gogoalsh/public_html/index.php(148): Zend_Controller_Front->dispatch()
#10 {main}