0
我對Zend很新。如何使用不等於Zend中的過濾器
我知道我可以用這種方式來過濾我的表:
$users = $this->getEntityManager()
->getRepository('MyProject\Domain\User')
->findBy(array('age' => 20, 'surname' => 'foo'));
這會給我的只有誰擁有20歲及姓爲Foo的用戶。
但是我想要篩選哪裏有20歲以上的用戶,姓是not foo
。
請指教。
謝謝,但我分配給這個變量 - '$ em'?它是'$ em = $ this-> getDoctrine() - > getEntityManager();'? –
謝謝,它有幫助。 –
Ah sry更新我的代碼以使用較短的(和正確的)語法 – danopz