Created
July 16, 2013 17:22
-
-
Save cobyl/6010714 to your computer and use it in GitHub Desktop.
i jeszcze dodatkowe przykłady
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$this->tablegateway->select(function (\Zend\Db\Sql\Select $select) use ($params){ | |
// kolumna created = updated | |
$select->where->equalTo('id','created'); | |
// i pole like zawiera cos tam szukanego | |
$select->where->AND->like('name',"%".$params['search']."%"); | |
// i pole email jest test@test.pl albo z domeny @test.com | |
$select->where->AND->NEST->equalTo('email','test@test.pl')->OR->like('email','%@test.com'); | |
// a do tego jeszcze parametr email malymi literkami równa ... itd | |
$select->where->addPredicate(new \Zend\Db\Sql\Predicate\Expression("LOWER(email) = ?",$params['email'])); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment