We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

findFirst with LEFT JOIN


I'm trying to make use LEFT JOIN in findFirst using User::query() function but there is no result containing any of the required data. Could anyone point me to a right direction?


edited Jan '15


$query = "select model1.*, model2.* from model1 left join model2";

make sure your relationship is declared else you need to explicitly declare the link. =)