$model = Item::find()
->select('group_concat(item.ID) AS ItemID')
->joinWith('image', true, 'LEFT JOIN')
->where('item.user_id = :id', [':id' => Yii::$app->user->identity->ID])
->all();
你看,如果我不喜歡這一點,將打印我的itemid的字符串,以逗號分隔 145元,但如果有3000K記錄數據庫, 所以它會輸出我只有一半。PHP YII2設置會話group_concat_max_len
問題是,是否可以在Yii2框架中設置會話group_concat_max_len的 ?
THX,真的沒有想到這個 –