We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

How to make Left Join Api

Please, help me for how to make left join api correctly

<br /> <b>Fatal error</b>: Uncaught Phalcon\Mvc\Model\Exception: Syntax error, unexpected token COMMA, near to ' PrfTeachers as c WHERE a.is_accept='Y' AND a.id_prf_teacher=c.id_teachers AND b.student_id = :id:', when parsing: SELECT c.*, b.rating, b.rating_date, b.rating_comments FROM Transactions AS a LEFT JOIN Rating AS b ON a.id_prf_teacher = b.teacher_id, PrfTeachers as c WHERE a.is_accept='Y' AND a.id_prf_teacher=c.id_teachers AND b.student_id = :id: (233) in /var/www/html/api_gurules/index.php:180

You have a , syntax on LEFT JOIN Rating AS b ON a.idprfteacher = b.teacherid, PrfTeachers as c WHERE a.isaccept='Y

PrfTeachers as c should also have a Left Join to it