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=/mydata/www/dayinpai/apps/frontend/controllers/PersonController.php Line=835

#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 /mydata/www/dayinpai/apps/frontend/controllers/PersonController.php(835): 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 /mydata/www/dayinpai/public/index.php(82): Phalcon\Mvc\Application->handle()
#8 {main}