Код: Выделить всё
$this->db->select('invoice.*,customer.custid,customer.cust_name,customer.cperson,customer.cust_email,customer.cust_mobile,customer.cust_address,sum(payment_received.amount) as paid_amount');
$this->db->join('customer','customer.custid=invoice.custid');
$this->db->join('payment_received','invoice.inid=payment_received.inid','left');
$this->db->where('@paid_amount IS NULL');
Как прекратить сбежать из имени столбца?>
Подробнее здесь: https://stackoverflow.com/questions/285 ... th-codeign