We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 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..!!!

where("[delete] = 'N'")


thank you...its working now