标签: activerecord yii2
我可以使用" a = 0"
SELECT * FROM list ORDER BY a = 0, a; => Email::find()->orderBy('a=0', 'a')
答案 0 :(得分:4)
这可以帮到你:
Email::find()->orderBy([new \yii\db\Expression('a=0'), 'a' => SORT_ASC]);