codeigniter where date interval
$this->db->where('order_date >=', $first_date); $this->db->where('order_date <=', $second_date); return $this->db->get('orders');
Here is what the above code is Doing:
1. We’re using the $this->db->where() function to set the WHERE clause of our query.
2. We’re using the $this->db->get() function to execute the query and return the results.