我使用group_concat并显示显示类似1,2,3,4,5的数据,但我想在列中显示

时间:2019-08-02 16:34:38

标签: codeigniter codeigniter-3

我使用group_concat来显示1,2,3,4,5之类的数据,但我想在列中显示

$this->db->group_by(array('MONTH(date)'));

$this->db->where('DATE(date)', $date);

$this->db->select('group_concat(title) as title');

$this->db->select('group_concat(remarks) as remarks');

$this->db->select('amount as ignore');

$this->db->select('group_concat(amount) as totall');

$this->db->select('sum(amount) as totals');

return  $this->db->get('expanses')->row();

0 个答案:

没有答案