Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Creating a nested SQL query with \Zend\Db\Sql
$select->where(array("ItemID" => (int)$itemId));
$select->where->and->nest
->like('FirstName', $inputFilter->getValue("searchCriteria") . "%")
->or->like('FirstName', "%" . $inputFilter->getValue("searchCriteria"))
->or->like('LastName', $inputFilter->getValue("searchCriteria") . "%")
->or->like('LastName', "%" . $inputFilter->getValue("searchCriteria")
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.