ci更新字段+1怎么写
$this->db()->update('pp_bbs_new', array('fans' => `fans` + 1 ), "uid IN ({$uids})");这些是错的,该怎么写呢?我要把fans加1
本帖最后由 Oh,MyGod。 于 2012-8-24 17:05 编辑
, "uid IN ({$uids})"
把这个去掉就可以了
$this->db->set('field', 'field+1', FALSE);
http://codeigniter.org.cn/user_guide/database/active_record.html
看手册啊亲~
页:
[1]