function getData(){
$id = $this->uri->segment(3);
$this->db->select("t.*, mt.mid as mid, mt.amt as mtamt, m.user");
$this->db->from("transaction as t");
$this->db->join("mtrans as mt", "mt.tid = t.id and mt.mid = '$id'", "left outer");
$this->db->join("member as m", "m.id = mt.aid", "left outer");
$query = $this->db->get();
$data = $query->result_array();
return $data;
}
对于初学者来说,这是我的代码。如何操作它,以便mt.amt
t.id
和mt.mid
mt.amt
显示为1行,显示mt.amt
列中所有{{1}}的总和?