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

Do findFirst Automatically Clean Database Injection

Hi

We are using many times findFirst to load first item based on user value

function userItem($id)
{
    return User::findFist($id); // maye be User::find();
}

I want to know does it automatically does clean on SQL injections? Or do I have to use "bind => array(...)" instead ?



2.3k

Nope, I want to no do Phalcon do this automattically without using bind, when I want to find items with Integer IDs throgh find( and findFirst( ?

@pedped Check my comment as answer and close it please