我修改了下lib_goods.php 报这样的错误。。 谁能帮我看看怎么错的
2016-07-07 16:15 来源:www.chinab4c.com 作者:ecshop专家
哪位大哥来帮我看看啊。。。。 |
回答:
有人没? |
$sql = 'SELECT g.goods_id, g.goods_name, g.goods_name_style, g.market_price, g.shop_price AS org_price, g.promote_price,SUM(og.goods_number) as goods_number ' . "IFNULL(mp.user_price, g.shop_price * '$_SESSION[discount]') AS shop_price, ". "promote_start_date, promote_end_date, g.goods_brief, g.goods_thumb, g.goods_img, RAND() AS rnd " . 'FROM ' . $GLOBALS['ecs']->table('goods') . ' AS g '. "LEFT JOIN " . $GLOBALS['ecs']->table('order_goods') . " AS og ". "ON og.goods_id = g.goods_id ". "LEFT JOIN " . $GLOBALS['ecs']->table('member_price') . " AS mp ". "ON mp.goods_id = g.goods_id AND mp.user_rank = '$_SESSION[user_rank]' "; 这是我修改的数据库语句 |
没人么????????????????? |
重建立数据库表就可以了。没什么大问题。注意备份原表数据就OK。 |
额。。。什么意思????数据库里有这个表啊。。。 |
把原文件替换回去还会报错吗? 如果不会,那么你修改后保存时注意编码,或是用DW来改。 |
还有没有人啊。。。。。 |
那你要说清楚你修改了什么字段内容才出错的,要详细点,要不谁都帮不了你。还原你的操作给我们瞧下 |
原来是$sql = 'SELECT g.goods_id, g.goods_name, g.goods_name_style, g.market_price, g.shop_price AS org_price, g.promote_price, ' . "IFNULL(mp.user_price, g.shop_price * '$_SESSION[discount]') AS shop_price, ". "promote_start_date, promote_end_date, g.goods_brief, g.goods_thumb, g.goods_img, RAND() AS rnd " . '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]' "; 我改成 $sql = 'SELECT g.goods_id, g.goods_name, g.goods_name_style, g.market_price, g.shop_price AS org_price, g.promote_price,SUM(og.goods_number) as goods_number ' . "IFNULL(mp.user_price, g.shop_price * '$_SESSION[discount]') AS shop_price, ". "promote_start_date, promote_end_date, g.goods_brief, g.goods_thumb, g.goods_img, RAND() AS rnd " . 'FROM ' . $GLOBALS['ecs']->table('goods') . ' AS g '. "LEFT JOIN " . $GLOBALS['ecs']->table('order_goods') . " AS og ". "ON og.goods_id = g.goods_id ". "LEFT JOIN " . $GLOBALS['ecs']->table('member_price') . " AS mp ". "ON mp.goods_id = g.goods_id AND mp.user_rank = '$_SESSION[user_rank]' "; |
把lib_goods.php文件还原回去就行了,改php文件首先要懂的php才行,不然乱改肯定出错! |
额。。。。我想加个库存。。。。原来的里面没有。。 哪位大哥大姐能给我讲下怎么加不? |
没人帮帮我么。。。。。 |
.....终于解决了 |
最近更新
常用插件
- ecshop注册审核插件
ecshop插件介绍:ecshop会员注册审核插件,主要是在前台提供给注册的时候...
- ecshop的oss插件
ecshop的oss插件免费共享了,oss,ecshoposs...
- ecshop订单聚合插件
ecshop订单聚合插件,主要是为了方便ecshop中订单产品到货情况的分析和...
- ecshop虚拟发货插件
ecshop虚拟发货插件介绍: ecshop虚拟发货插件,主要为了通过后台手动录...
- ecshop没登陆情况下订单查
ecshop没登陆情况下订单查询插件,主要是针对ecshop在没有登陆的情况下...
ecshop热门问答
ecshop热门资料
ecshop图片调整
ecshop结帐
ecmallmodel
ecshopgoods_cat
ecshopu4idc
ecshop手动
ecshop业绩
ecshop简写
ecshop安装数结束错误
ecshop批量处理
ecshop导航栏背景色
ecshopsettings
ecshop误删public_html
ecshop成功率
ecshop胶水
ecshop落伍
ecshop栏目首页
ecshop优惠商品
mongodb
ecshop莫明
ecshop品牌筛选
ecshopec后台
ecshop精华帖
ecshop本网价格
dederank
ecshop加密串
ecshopbanner
ecshop短袖
ecshop改版
ecshop商品属性筛选