PhalconException : happened in Phalcon\Mvc\Model\Exception class
ExceptionMessage : Syntax error, unexpected token AND, near to ' (status = 5)', when parsing: SELECT COUNT(*) AS rowcount FROM [Apps\Commons\Models\Orders] WHERE buid= and (status = 5) (90)
File=/srv/www/dayinpai/apps/frontend/controllers/PersonController.php Line=803

#0 [internal function]: Phalcon\Mvc\Model\Query->parse()
#1 [internal function]: Phalcon\Mvc\Model\Query->execute(NULL, NULL)
#2 [internal function]: Phalcon\Mvc\Model::_groupResult('COUNT', 'rowcount', Array)
#3 /srv/www/dayinpai/apps/frontend/controllers/PersonController.php(803): Phalcon\Mvc\Model::count(Array)
#4 [internal function]: Apps\Frontend\Controllers\PersonController->modelAction()
#5 [internal function]: Phalcon\Dispatcher->callActionMethod(Object(Apps\Frontend\Controllers\PersonController), 'modelAction', Array)
#6 [internal function]: Phalcon\Dispatcher->_dispatch()
#7 [internal function]: Phalcon\Dispatcher->dispatch()
#8 /srv/www/dayinpai/public/index.php(82): Phalcon\Mvc\Application->handle()
#9 {main}