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

Fetching particular set of db values using Criteria::fromInput

i want fetch particular set of values from database using Criteria::fromInput my code for this is $query = Criteria::fromInput($this->di, "modelname", $this->request->getPost()); $query->where("delete = 'N'");// where condition...

        when i tried the above code i got the following error 
         Syntax error, unexpected token DELETE, near to ' = 'N'', when parsing: SELECT [table].* FROM [table] WHERE delete = 'N' (50)

0 [internal function]: Phalcon\Mvc\Model\Query->parse()

1 [internal function]: Phalcon\Mvc\Model\Query->execute()

please somebody help..!!!



85.5k
Accepted
answer
where("[delete] = 'N'")

?

thank you...its working now