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

Is there a difference between find and findFirst ?

I just wonder is there more diffrence between find and findFirst or only this second return always one item from database instead of array ? So i can select columns, type of hydration etc in both find and findFirst ?



2.7k

findFirst() will always return the first result of any query you do.



34.6k
Accepted
answer

findFirst() and find() both receive the same parameters however the former returns one record maximum and find() always returns a resultset of records (0-n)