我有以下查询Codigniter活动记录更新查询到老where子句
$this->db->set('registerStep', $param)
->where('id = ',$user_id)
->update($this->table_name);
以上查询是生产以下SQL代码。即使我只提供一个条件。
UPDATE `users` SET `registerStep` = 2 WHERE `id` = 33 AND `id` = '165'
我认为活动记录是使用一些缓存where条件,有什么办法,我可以自由where条件。
我尝试使用
$this->db->flush_cache();
但它没有帮助。
尝试在$ user_ID的一个的var_dump,看看它是在该行之前设定的权利。 – 2012-02-21 14:59:58
为什么不试试$ this-> db-> where('id',$ id); $ this-> db-> update('users',$ param); – 2012-02-21 15:02:02
我试过'$ this-> db-> where('id',$ id); $ this-> db-> update('users',$ param);'但它没有帮助 – 2012-03-10 15:20:28