multiple where condition codeigniter

前端 未结 7 1042
感情败类
感情败类 2021-02-01 15:16

How can I convert this query to active record?

\"UPDATE table_user 
 SET email = \'$email\', last_ip = \'$last_ip\' 
 where username = \'$username\' and status =         


        
7条回答
  •  一生所求
    2021-02-01 16:11

    Yes, multiple calls to where() is a perfectly valid way to achieve this.

    $this->db->where('username',$username);
    $this->db->where('status',$status);
    

    http://www.codeigniter.com/user_guide/database/query_builder.html

提交回复
热议问题