YII2使用“加入”的活动记录,我认为这些Sql不应该执行

时间:2017-09-13 09:55:52

标签: php yii2 yii2-advanced-app

为什么这些sql执行我认为“joinWith”finsh全部工作

enter image description here *这是我的模特   enter image description here

php $query = Teacher::find()->select([ '{{%teacher}}.id','{{%teacher}}.nickname','{{%teacher}}.type_id','{{%teacher}}.header_img','{{%teacher}}.type_id', '{{%teacher}}.edu_area_deep3','{{%teacher}}.edu_level','{{%teacher}}.edu_class','{{%teacher}}.college_graduate_id', '{{%teacher}}.sex', '{{%teacher}}.edu_count_time','{{%teacher}}.edu_count_number','{{%teacher}}.teach_subject', '{{%teacher}}.specialty','{{%teacher}}.reward_count','{{%teacher}}.oneself' ])->joinWith(['typeName','eduLevel','collegeGraduate'])->asArray();

0 个答案:

没有答案