最新回答 / 一人之下丶
第一个foreach是循环sql查询,每次取出一个结果集第二个foreach没有sql查询了,因为$orders里面是一个大结果集,只是单纯的PHP遍历。
2018-01-20
已采纳回答 / 幕布斯4316520
$cookie->add(new Cookie(['user' => 'zhangsan','value' => 'lihaile']));不是'user' => 'zhangsan',是name=>'zhangsan'你再试一下
2017-12-04
最新回答 / qq_以前以后_5
$customers = Customer::find()->joinWith('order')->asArray()->all();我也是新手,你可以看看这篇文章,http://blog.csdn.net/lihe460186709/article/details/71172938
2017-09-30