ecshop数据库出现错误,前台显示MySQL server error report:Array ( [0] => Array
从另一个网站备份数据库导入后,打开网站出现MySQLservererrorreport:Array([0]=>Array([message]=>MySQLQueryErr...
从另一个网站备份数据库导入后,打开网站出现
MySQL server error report:Array ( [0] => Array ( [message] => MySQL Query Error ) [1] => Array ( [sql] => SELECT g.goods_id, g.goods_name, g.goods_thumb, SUM(og.goods_number) as goods_number,g.comments_number, g.market_price, g.shop_price , g.promote_price FROM `ec`.`ecs_goods` AS g, `ec`.`ecs_order_info` AS o, `ec`.`ecs_order_goods` AS og WHERE g.is_on_sale = 1 AND g.is_alone_sale = 1 AND g.is_delete = 0 AND (g.cat_id IN ('2','16','13','3','6','7','4','9','8','12','5','17') OR g.goods_id IN ('') ) AND o.order_sn >= '20150720' AND g.goods_number > 0 AND og.order_id = o.order_id AND og.goods_id = g.goods_id AND (o.order_status = '1' OR o.order_status = '5') AND (o.pay_status = '2' OR o.pay_status = '1') AND (o.shipping_status = '1' OR o.shipping_status = '2') GROUP BY g.goods_id ORDER BY goods_number DESC, g.goods_id DESC LIMIT 7 ) [2] => Array ( [error] => Unknown column 'g.comments_number' in 'field list' ) [3] => Array ( [errno] => 1054 ) )
不知道是出了什么问题,望高手给个具体的解决方法,最好详细一些,谢谢 展开
MySQL server error report:Array ( [0] => Array ( [message] => MySQL Query Error ) [1] => Array ( [sql] => SELECT g.goods_id, g.goods_name, g.goods_thumb, SUM(og.goods_number) as goods_number,g.comments_number, g.market_price, g.shop_price , g.promote_price FROM `ec`.`ecs_goods` AS g, `ec`.`ecs_order_info` AS o, `ec`.`ecs_order_goods` AS og WHERE g.is_on_sale = 1 AND g.is_alone_sale = 1 AND g.is_delete = 0 AND (g.cat_id IN ('2','16','13','3','6','7','4','9','8','12','5','17') OR g.goods_id IN ('') ) AND o.order_sn >= '20150720' AND g.goods_number > 0 AND og.order_id = o.order_id AND og.goods_id = g.goods_id AND (o.order_status = '1' OR o.order_status = '5') AND (o.pay_status = '2' OR o.pay_status = '1') AND (o.shipping_status = '1' OR o.shipping_status = '2') GROUP BY g.goods_id ORDER BY goods_number DESC, g.goods_id DESC LIMIT 7 ) [2] => Array ( [error] => Unknown column 'g.comments_number' in 'field list' ) [3] => Array ( [errno] => 1054 ) )
不知道是出了什么问题,望高手给个具体的解决方法,最好详细一些,谢谢 展开
3个回答
展开全部
'g.comments_number
看看是不这个写错了
看看是不这个写错了
追问
没见数据库里有这个表呀,在哪里可以找到他 ,应该怎么写
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
缺少g.comments_number字段
追问
这个要添加到哪里面,怎么样添加,谢谢,
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询