i want to select data according to date if there are to data with same date like 2 july and again 2 july then echo both data separately in my this query its shows only one date data
function get_this_date_expenses($date)
{
if (!empty($_POST['ecategory_id'])) {
$this->db->where('expanses_category_id',
$_POST['ecategory_id']);
}
$this->db->group_by(['MONTH(date)']);
$this->db->where('DATE(date)', $date);
$this->db->select('SUM(amount) as total');
$this->db->select('amount as totals'); --->in this line am select table
return $this->db->get('expanses')->row();
);