简体   繁体   English

不等于用推进器检查

[英]Not equal to check with propel

I want to check not equal to condition with propel how can I do this? 我想检查不等于条件的推进器该怎么办? I tried it with filter by method, but it is not working. 我尝试了按方法过滤,但无法正常工作。 Any help or suggestion will be appreciated. 任何帮助或建议,将不胜感激。

Code:- 码:-

$school = models\\SchoolQuery::create() ->joinWith('Course') ->where("SchoolType <> 0") ->orderBySchoolName('asc') ->find()->toArray()

This should work: 这应该工作:

$school = models\SchoolQuery::create()
    ->joinWith('Course')
    ->filterBySchoolType(0, CRITERIA::NOT_EQUAL)
    ->orderBySchoolName() // asc is default, so you can ommit it
    ->find()
    ->toArray();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM