ecshop 首页显示商品总数和本月更新数

更新时间:2012-06-13 点击量:2880

ecsho首页显示商品总数和本月更新数
1)、首先修改 /index.php 
找到
assign_dynamic('index');
在它后边添加一些代码
$sql="select count(*) as goods_all from ". $ecs->table('goods'); //商品总数
$smarty->assign('goodsnum_all',$db->getOne($sql));
$time_month=mktime(0,0,0,date('m')-1,1,date('Y'));
$sql="select count(*) as goods_month from ". $ecs->table('goods') ." where last_update >= " . $time_month; //本月更新数
$smarty->assign('goodsnum_month',$db->getOne($sql));

 

支付宝扫码打赏 微信打赏

如果文章对您有帮助,就打赏一个吧

在线客服

客户服务

热线电话:

13128985956 服务时间:

周一到周六:9:00-18:00

在线QQ客服

在线微信客服

关于我们 常见问题

支付方式 加盟合作

提交需求
优惠红包 购物车0 反馈留言 返回顶部