数据UPDATE写法中的set问题
本帖最后由 zhangcjl 于 2011-5-22 13:51 编辑update show set flower = flower+1where id = 1
我用
function update_chat_num($c_id)
{
$this->db->where('cid', $c_id);
$this->db->db->set('re_num','re_num+1',FALSE);
$this->db->update('gou_chat');
}
我这样写那个re_num的数值没更新过~~悲催~~~求解~~~谢谢~~~
但是写sql语句倒是可以
$sql ="UPDATE `gou_chat` SET `re_num`=`re_num`+1 WHERE`gou_chat`.`cid`={$c_id};";
$query = $this->db->query($sql);
求解~~
页:
[1]