Yii2.0 子查询的写法:
Wrong::find()
->where([
't.fdUserID' => 4,
't.fdStatus' => 0
])
->alias('t')
->leftJoin(
Exercise::tableName().' exercise',
'exercise.id=t.fdExerciseID and exercise.fdStatus=1'
);
该方法使用到了model