on-internet
← Community

CodeIgniter's join() using a PHP variable for the table name is near the error position in the query

Stack Overflow ·

There is a similar problem like this but instead, his problem was passing the ID. But mine is something else. Like this. But I get errors. $this->db->join($user_role, $user_role.'school_id = user.school_id', 'left'); Gives Unknown column 'adminschool_id' in 'on clause' $this->db->join($user_role, $user_role'.school_id = user.school_id', 'left'); Gives unexpected ''.school_id = user.school_id''

Comments

Sign in or sign up to comment and upvote.

No comments yet.