点击一级分类,显示该分类下所有商品的原理是什么?怎样操作数据库?
2016-07-07 15:13 来源:www.chinab4c.com 作者:ecshop专家
点击一级分类,显示该分类下所有商品的原理是什么?怎样操作数据库? |
回答:
$sql = 'SELECT g.goods_id, g.goods_name,g.goods_number, g.goods_name_style, g.market_price, g.is_new, g.is_best, g.is_hot, g.shop_price AS org_price, ' . "IFNULL(mp.user_price, g.shop_price * '$_SESSION[discount]') AS shop_price, g.promote_price, g.goods_type, " . 'g.promote_start_date, g.promote_end_date, g.goods_brief, g.goods_thumb , g.goods_img ' . 'FROM ' . $GLOBALS['ecs']->table('goods') . ' AS g ' . 'LEFT JOIN ' . $GLOBALS['ecs']->table('member_price') . ' AS mp ' . "ON mp.goods_id = g.goods_id AND mp.user_rank = '$_SESSION[user_rank]' " . "WHERE $where $ext ORDER BY $sort $order"; $res = $GLOBALS['db']->selectLimit($sql, $size, ($page - 1) * $size); |
$sql = 'SELECT g.goods_id, g.goods_name,g.goods_number, g.goods_name_style, g.market_price, g.is_new ... |
通过分类id获得的商品 |
最近更新
常用插件
- ecshop2.7.2退换货申请插件
ecshop2.7.2退换货申请插件,主要是在 ecshop 现在的基础上,对ecshop的订单处...
- ecshop注册推荐送现金插件
ecshop中的促销售功能还不是很完善,随着电子商务系统的发展和进步,...
- ecshop二次商品订购人信息
ecshop二次商品订购人信息填写插件,有时候给朋友送花,或者是送礼品的...
- ecshop会员中心订单excel倒出
ecshop会员中心订单excel倒出...
- ecshop二次开发商品购买备
ecshop销售统计 插件介绍:ecshop二次开发订单销售统计和商品购买备注服...
ecshop热门问答
ecshop热门资料
ecshop手机充值卡
ecshop答复
ecshop乘以
ecshop模版更改
ecshop商务
ecshop模板规范
ecshopstats
ecshop3个空白
ecshop在线帮助
ecshop商品点击数
ecshop阿门
ecshopundefied
ecshop动静
ecshopMobie
ecshop详细内容
ecshop格式
推荐人
ecshopconfig
ecshop订单中心修改
ecshopOnly
ecshophomepage
ecshop吸引力
ecshop聊天
ecshopEMS
ecshop莫明
ecshop电影网站
ecshop51买包包
ecshopppg
ecshop邮件回复地址
ecshopCESHOP