CI框架MySQL一次更新多条记录

    public function update($username, $cidList)
    {
        $data = [
            'status' => '1',
            'del_time' => date('Y-m-d H:i:s')
        ];
        foreach ($cidList as $cid) {
            $this->db->or_where('cid', $cid);
            $this->db->where('uid', $username);
        }
        $query = $this->db->update($this->contentTable, $data);
        return $query;
     }
-- 展开阅读全文 --
安卓okhttp3 get请求,并更新Ui
下一篇 » 12-03

发表评论