出现Invalid parameter number: no parameters were boundStack

Message: SQLSTATE[HY093]: Invalid parameter number: no parameters were boundStack

 trace:#0 D:\amp\Zend\Db\Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)#1 D:\amp\Zend\Db\Adapter\Abstract.php(468): Zend_Db_Statement->execute(Array)#2 D:\amp\Zend\Db\Adapter\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query(Object(Zend_Db_Table_Select), Array)#3 D:\amp\Zend\Db\Table\Abstract.php(1505): Zend_Db_Adapter_Pdo_Abstract->query(Object(Zend_Db_Table_Select))#4 D:\amp\Zend\Db\Table\Abstract.php(1367): Zend_Db_Table_Abstract->_fetch(Object(Zend_Db_Table_Select))#5 D:\amp\www\vhost.xmisp.com\newhost3.0\application\library\Newhost\Room.php(40): Zend_Db_Table_Abstract->fetchRow(Object(Zend_Db_Table_Select))#6 D:\amp\www\vhost.xmisp.com\newhost3.0\application\library\Newhost\Vhost.php(94): Newhost_Room::getRoomId(NULL)#7 D:\amp\www\vhost.xmisp.com\newhost3.0\application\modules\user\controllers\IndexController.php(204): Newhost_Vhost::checkCanUp('822465', '336763')#8 D:\amp\Zend\Controller\Action.php(513): User_IndexController->indexAction()#9 D:\amp\Zend\Controller\Dispatcher\Standard.php(295): Zend_Controller_Action->dispatch('indexAction')#10 D:\amp\Zend\Controller\Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))#11 D:\amp\Zend\Application\Bootstrap\Bootstrap.php(97): Zend_Controller_Front->dispatch()#12 D:\amp\Zend\Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()#13 D:\amp\www\vhost.xmisp.com\newhost3.0\public\index.php(24): Zend_Application->run()#14 {main} Request Parameters:array ( 'module' => 'user', 'controller' => 'index', 'action' => 'index',)


发现是getRoomId的地方是NULL,但是改为任何数字都都可以,经过调试是关联的表数据为NULL,无法进入查询报错。


ps:字符串强转(int)为变成0

你可能感兴趣的:(出现Invalid parameter number: no parameters were boundStack)