on-internet
← Community

CodeIgniter query builder query fails in the rendered SELECT clause when table alias is separated from the column name using comma then dot [closed]

Stack Overflow ·

public function getIncomeBranches() { return $this->db ->select('t1.subject_name, t2.payment_grand, t2,.payment_date, t3.level_id') ->join('groups AS t3', 't1.subject_id = t3.group_id', 'left') ->join('payments AS t2', 't1.subject_id = t2.payment_id') ->group_by('t1.subject_id') ->get("subjects AS t1") ->result(); } Problem Error Number: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' t3.level_id FROM subjects AS t1 LEFT JOIN groups AS t3 ON t1.`sub' at line 1 SELECT `t1`.`subject_name`, `t2`.`payment_

Comments

Sign in or sign up to comment and upvote.

No comments yet.