Codeigniter model with multiple update conditions using manual where statement

前端 未结 1 1680
别跟我提以往
别跟我提以往 2021-01-20 22:14

I have this code in model that returns data

$this->db->select(\'title, content, date\');

$where = \"name=\'Joe\' AND status=\'boss\'\";

$this->db-         


        
相关标签:
1条回答
  • 2021-01-20 22:59

    As per document in CodeIgniter Where, you have to mention here with OR or AND "id=$id, name='Joe'.

    $where = "id=$id AND/OR name='Joe' AND status='boss'";
                      ^^^^
                    Chose one
    


    Or use array

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