private function get_sum_value_total_spent_receive_today($table, $field){ if (!get_role("admin")) { $this->db->where("uid", session("uid")); } $this->db->select("SUM(".$field.") as total"); $this->db->from($table); $this->db->where("status", 1); $query = $this->db->get(); $result = $query->result(); if ($result[0]->total > 0) { return $result[0]->total; }else{ return 0; } }
private function get_sum_value_total_spent_receive_today($table, $field){ if (!get_role("admin")) { $this->db->where("uid", session("uid")); } $this->load->helper('date'); $this->db->select("SUM(".$field.") as total"); $this->db->from($table); $this->db->where("status", 1); $this->db->set('created', 'NOW()', FALSE); $query = $this->db->get(); $result = $query->result(); if ($result[0]->total > 0) { return $result[0]->total; }else{ return 0; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)