细胞位置发生变化

时间:2018-01-13 14:42:19

标签: php mysql

我试图用表格中显示的数据解决问题(见图) https://i.stack.imgur.com/iCvy3.png

我想要做的是将3列文本替换为6列总和                              和4列tex将被6列和替换。

我写的代码就是这个。我错过了什么?

        $this->load->library('datatables');
        $this->datatables
            ->select("DATE_FORMAT({$this->db->dbprefix('payments')}.date, '%Y-%m-%d %T') as date, " . $this->db->dbprefix('payments') . ".reference_no as payment_ref, " . $this->db->dbprefix('sales') . ".reference_no as sale_ref, " . $this->db->dbprefix('purchases') . ".reference_no as purchase_ref, paid_by, amount, type, {$this->db->dbprefix('payments')}.id as id")
            ->from('payments')
            ->join('sales', 'payments.sale_id=sales.id', 'left')
            ->join('purchases', 'payments.purchase_id=purchases.id', 'left')
            ->group_by('payments.id');

0 个答案:

没有答案