problem with where in codeIgniter

前端 未结 3 1993
误落风尘
误落风尘 2021-01-29 04:16

if use of this code, show me all data, all names and all ids. what do i do?
i use of codeIgniter

With respect

$search_customer = 1;//$this->input->         


        
3条回答
  •  借酒劲吻你
    2021-01-29 04:37

    Try this for the conditions:

    $this->db->where('id', $search_customer);
    $this->db->or_where('name', $search_customer);
    

    You can see on the docs that using get_where you use an associative array.

提交回复
热议问题