1、forecah里要给对象新增字段。as后的变量要加&。例如:
foreach($list as &$group){ //新增字段 $group['aaaa'] = "add field";}
2、redis zrange获取,mysql select用到in的时候
$idlist = $this->redis->zRange('test:zlist', 0, -1, false);$inStr = implode(',',$idlist);$sql = "select * from test where id in ($inStr)";