Here am stuck with the or_where_in
condition.while using this condition the result is obtaining correctly here is my code please have a look
public function get_date_wise_sales_info($start_date, $end_date,$type=NULL,$user_id=NULL,$get_all_user_ids=NULL)
{
if(!empty($type))
{
$this->db->where('type',$type);
}
if(!empty($user_id))
{
$this->db->where('user_id', $user_id);
}
if(!empty($get_all_user_ids))
{
$this->db->or_where_in('user_id',$get_all_user_ids);
}
$this->db->where("DATE(bills.created_at) BETWEEN '{$start_date}' AND '{$end_date}'");
$this->db->order_by('bills.id','desc');
$query = $this->db->get('bills');
return $query->result();
}
here by using or_where_in
condition the results of not selected dates
are coming and if i remove or_where_in
the result is obtaining correctly.how to write the correct syntax of using or_where_in
.i wrote where_in
instead of or_where_in
but nothing is getting displayed and am using codeigniter 3.1.5 version