当前位置 : 主页 > 网络编程 > PHP >

insertByForeach.php

来源:互联网 收集:自由互联 发布时间:2021-06-28
insertByForeach.php alias('a') -join('__USER__ ac', 'a.openid = ac.openid', "left") -field('a.*,ac.*,a.id as idd') -order('a.time', 'desc') -select(); foreach($list as $key=$v){ $cwhere['a.payid'] = $list[$key]['id']; $comment = Db::name('l
insertByForeach.php
 alias('a')
        ->join('__USER__ ac', 'a.openid  = ac.openid', "left")
        ->field('a.*,ac.*,a.id as idd')
        ->order('a.time', 'desc')
        ->select();
        
foreach($list as $key=>$v){
    $cwhere['a.payid'] = $list[$key]['id'];
    $comment = Db::name('lun')->alias('a')->join('__USER__ ac', 'a.openid  = ac.openid', "left")->field('a.*,ac.*')->where($cwhere)->order('time desc')->select();
    $list[$key]['comment'] = $comment;
}
上一篇:jumpToUrl.php
下一篇:stock.class.php
网友评论