Update with limit 1 in codeigniter use active record

后端 未结 1 1037
梦谈多话
梦谈多话 2020-12-19 06:24

I\'m trying to update a single record with the active record of codeigniter and it still fails.

$data = array(\'status\' => 1);

$this->db->where(\'         


        
相关标签:
1条回答
  • 2020-12-19 07:08

    Move the limit before the update which should be always called last:

    $this->db->limit(1);
    $this->db->update('example', $data);
    
    0 讨论(0)
提交回复
热议问题