multiple where condition codeigniter

前端 未结 7 1041
感情败类
感情败类 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:19

    $wherecond = "( ( ( username ='" . $username . "' OR status='" . $status . "') AND (id='" . $id . "') ) )"; $this->db->where($wherecond);

    If you want to add AND and OR conditions at a time. this will work.

    0 讨论(0)
提交回复
热议问题