用户
 找回密码
 入住 CI 中国社区
搜索
查看: 2773|回复: 1
收起左侧

[初级] 数据库某个字段加 1

[复制链接]
发表于 2013-9-18 11:06:56 | 显示全部楼层 |阅读模式
本文章仅供搜索引擎使用。

PHP复制代码
 
        $this->db->set('comment_count','comment_count+1',FALSE);
        $this->db->where('id',$this->input->post('postid'));
        $this->db->update('m23_job');
 
复制代码


详细请看 CI 手册   db->set 使用方法

发表于 2013-9-18 11:24:22 | 显示全部楼层
{:soso_e179:}

本版积分规则