MySQL server error report:Array ( [0] => Array ( [message] =

2016-07-07 15:38 来源:www.chinab4c.com 作者:ecshop专家

下订单的时候,填写完个人信息后提交,就会出现如下提示:

MySQL server error report:Array ( [0] => Array ( [message] => MySQL Query Error ) [1] => Array ( [sql] => INSERT INTO `12345678`.`zxd_order_goods`( order_id, goods_id, goods_name, goods_sn, goods_number, market_price, goods_price, goods_attr, is_real, extension_code, parent_id, is_gift, goods_attr_id) SELECT '10', goods_id, goods_name, goods_sn, goods_number, market_price, goods_price, goods_attr, is_real, extension_code, parent_id, is_gift, goods_attr_id FROM `12345678`.`zxd_cart` WHERE session_id = '5c5c27eb79e4a89e3ada9161fa6429dc' AND rec_type = '0' ) [2] => Array ( [error] => Unknown column 'goods_attr_id' in 'field list' ) [3] => Array ( [errno] => 1054 ) )

请各位大侠指教!!


应该如何解决呢?

回答:
查看下你数据库的表。字段不对

修复下表cart缺少字段

修复过了,有几项提示:The storage engine for the table doesn't support repair,其他的正常
提示错误的有:
cdb_sessions
sv_sessions
uc_vars
uchome_adminsession
uchome_session
请问该如何解决呢?

cart表缺少goods_attr_id字段。

还有其他表您可以修复下

照 着做了,先修复了一下所有的表,然后在后台---sql查询执行了ALTER TABLE `zxd_cart` ADD `goods_attr_id` VARCHAR( 255 ) NOT NULL ;
问题仍然没有解决!
到底该怎么做呀?