Warning: Undefined array key "night" in /www/wwwroot/dhaomu.com/wp-content/themes/b2/header.php on line 18

EcShop获取最新购买代码函数

ecshop教程:ecshop获取最新购买代码函数!EcShop获取最新购买代码函数

代码演示

function index_get_recent_buy_query() 
{ 
  
    $sql="select og.goods_id,og.goods_name,sum(og.goods_number) as buy_count from (select order_id,add_time from ".$GLOBALS['ecs']->table('order_info')." order by add_time desc limit 10) as o,".$GLOBALS['ecs']->table('order_goods')." as og where o.order_id=og.order_id group by og.goods_id"; 
    $all = $GLOBALS['db']->getAll($sql); 
    $arr = array(); 
    foreach ($all AS $idx =>$row) 
    { 
  
        $arr[$idx]['goodName']  = $row['goods_name']; 
        $arr[$idx]['goodID']    = $row['goods_id']; 
        $arr[$idx]['add_time']  = local_date($GLOBALS['_CFG']['date_format'], $row['add_time']); 
        $arr[$idx]['buy_count']=$row['buy_count']; 
    } 
    return $arr; 
温馨提示:
1.本站大部分内容均收集于网络!若内容若侵犯到您的权益,请发送邮件至:duhaomu@163.com,我们将第一时间处理!
2.资源所需价格并非资源售卖价格,是收集、整理、编辑详情以及本站运营的适当补贴,并且本站不提供任何免费技术支持。
3.所有资源仅限于参考和学习,版权归原作者所有,更多请阅读网站声明

给TA赞赏
共{{data.count}}人
人已赞赏
编程技巧

EcShop商品详情页动态库存调用

2022-7-15 0:00:00

编程技巧

缩短织梦分页列表页/内容页显示分页页码

2022-7-19 0:00:00

0 条回复 A文章作者 M管理员

Warning: Trying to access array offset on value of type null in /www/wwwroot/dhaomu.com/wp-content/themes/b2/functions.php on line 3914

Warning: Trying to access array offset on value of type null in /www/wwwroot/dhaomu.com/wp-content/themes/b2/functions.php on line 3914
----《》
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索