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

Get fields of different table in find

I want to use a find and in my condition I want to get a field of the another table. I don't want to use a QueryBuilder or what. Just a find(). So it is possible do to this query in my find condition ?

SELECT *

FROM table1 t1 INNER JOIN table2 t2 ON (t1.id_t = t2.id_i)

WHERE t2.field = 'test'

edited Dec '15

Find is for finding data from model. If you wanna find data from another table/model then you are doing something seriously wrong here. If you wanna do joins then use queryBuilder.