Zend_DB_Table更新问题
我试图在我的模型中构建一个简单的更新查询
class Model_DbTable_Account extends Zend_Db_Table_Abstract
{
protected $_name = 'accounts';
public function activateaccount($activationcode)
{
$data = array(
'accounts_status' => 'active',
);
$this->update($data, 'accounts_activationkey = ' . $activationcode);
}
但是我收到
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'my activation code value'
in 'where clause'
错误。
我在 Zend_Table 更新构造中缺少什么?
Am trying to construct a simple update query in my model
class Model_DbTable_Account extends Zend_Db_Table_Abstract
{
protected $_name = 'accounts';
public function activateaccount($activationcode)
{
$data = array(
'accounts_status' => 'active',
);
$this->update($data, 'accounts_activationkey = ' . $activationcode);
}
However I get an
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'my activation code value'
in 'where clause'
error.
What am I missing in Zend_Table update construct?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在花了一些时间解决这个问题后,我找到了解决方案,并决定将其发布给可能遇到同样问题的任何人。
我
改为
After spending some time on this issue I found the solution and I decided to post it for anyone who might come across the same problem.
I changed
to