我想通过使用此更新命令来更新表,但是什么也没发生。有人知道为什么吗?
$db = Zend_Registry::get('db');
$updateData = array(
'user_type' => 0
);
$updateWhere = array(
'username = ?' => 'admin'
);
$res = $db->update('phpbb3_users', $updateData, $updateWhere);
由于此代码正在为我更新
$updateData = array(
'user_type' => 0
);
$updateWhere = array(
'username' => 'admin'
);
或者
$updateWhere = "username = 'admin'";
$db->update('phpbb3_users', $updateData, $updateWhere);
希望它一定能解决您的问题
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句