我想用推进检查不等于条件我该怎么办?我尝试过滤方法,但它不起作用。任何帮助或建议将不胜感激。
代码: -
$school = models\SchoolQuery::create() ->joinWith('Course') ->where("SchoolType <> 0") ->orderBySchoolName('asc') ->find()->toArray()
答案 0 :(得分:0)
这应该有效:
$school = models\SchoolQuery::create()
->joinWith('Course')
->filterBySchoolType(0, CRITERIA::NOT_EQUAL)
->orderBySchoolName() // asc is default, so you can ommit it
->find()
->toArray();