出现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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值