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 '))) AS t' at line 1

File: /var/www/ialoc/lib/Zend/Db/Statement.php (303)
Class: Zend_Db_Statement_Pdo -> _execute

File: /var/www/ialoc/lib/Zend/Db/Adapter/Abstract.php (479)
Class: Zend_Db_Statement -> execute

File: /var/www/ialoc/lib/Zend/Db/Adapter/Pdo/Abstract.php (238)
Class: Zend_Db_Adapter_Abstract -> query

File: /var/www/ialoc/lib/Ws/Model.php (752)
Class: Zend_Db_Adapter_Pdo_Abstract -> query

File: /var/www/ialoc/app/modules/restaurant/controllers/IndexController.php (322)
Class: Ws_Model -> getCount

File: /var/www/ialoc/lib/Zend/Controller/Action.php (516)
Class: Restaurant_IndexController -> indexAction

File: /var/www/ialoc/lib/Zend/Controller/Dispatcher/Standard.php (308)
Class: Zend_Controller_Action -> dispatch

File: /var/www/ialoc/lib/Zend/Controller/Front.php (954)
Class: Zend_Controller_Dispatcher_Standard -> dispatch

File: /var/www/ialoc/lib/Zend/Application/Bootstrap/Bootstrap.php (97)
Class: Zend_Controller_Front -> dispatch

File: /var/www/ialoc/lib/Zend/Application.php (366)
Class: Zend_Application_Bootstrap_Bootstrap -> run

File: /var/www/ialoc/public/index.php (46)
Class: Zend_Application -> run