-1
function get_debtors() {
$this->db->select('invoice.student_id as STUDENT_ID,student.name AS
STUDENT_NAME,section.name AS CLASS,
invoice.description AS DESCRIPTION,
invoice.amount AS TOTAL_AMOUNT,
invoice.amount_owed AS AMOUNT_OWED,
parent.name AS PARENT_NAME,
parent.email AS PARENT_EMAIL,
parent.phone AS PARENT_PHONE,
parent.address AS PARENT_ADDRESS,
invoice.status AS STATUS');
$this->db->from('invoice , student , parent , section ');
$this->db->join('student ', 'student.student_id = invoice.student_id');
$this->db->join('parent ', 'parent.parent_id = student.parent_id, 'left'');
$this->db->join('section ', 'section.section_id = student.section_id','left');
$this->db->where('invoice.status', 'debtor');
$query = $this->db->get();
あなたが親を余分に1つの ' ''この行のleft''は 'ます$ this-> DB->(参加後に'引用' を使用」、 'parent.parent_id = student.parent_id、 '左'' ); ' –
$ this-> db-> from(' invoice ')のインボイステーブルのみを使用します。他のテーブルは条件ごとに結合されます – hrishi