-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();
당신은 '이 라인'에 left'''후'인용 $ this-> DB-> (가입'여분의 하나를 '사용 부모', 'parent.parent_id = student.parent_id,'왼쪽 ''); ' –
에서 송장 테이블 만 사용하십시오. $ this-> db-> from ('invoice '); 조건에 따라 다른 테이블이 조인됩니다. – hrishi