网站后台更新数据出现报错: MySQL server error report:Array ( [0] => Array ( [message] => MySQL Query Error ) 网上很多教程说法都不正确,最模板客户问到,这里教程说明下。 比如网上百度有人问的:
MySQL server error report:Array ( [0] => Array ( [message] => MySQL Query Error ) [1] => Array ( [sql] => INSERT INTO `test`.`ecs_goods` (stock_price, goods_name, goods_name_style, goods_sncat_id, brand_id, shop_price, market_price, is_promote, promote_price, promote_start_date, promote_end_date, goods_img, goods_thumb, original_img, keywords, goods_brief, seller_note, goods_weight, goods_number, warn_number, integral, give_integral, is_best, is_new, is_hot, is_on_sale, is_alone_sale, is_shipping, goods_desc, add_time, last_update, goods_type, rank_integral, suppliers_id)VALUES ( '43' ,'dv', '+', 'vvvvv', '1', '', '59', '70.8', '0','0', '0', '0', '', '', '', '', '', '', '0', '1', '1', '0', '-1', '0', '0', '0', '1', '1', 0, '', '1305930787', '1305930787', '0', '-1', '0') ) [2] => Array ( [error] => Column count doesn't match value count at row 1 ) [3] => Array ( [errno] => 1136 ) ) 像这个报错,意思就是 插入的表内容 与数据库当中表的字段不对称! 排除方法,用phpmyadmin打开该数据库,找到该表结构, 拿报错出的字段来对下,查下插入的字段 是否在当前表存在! 刚那报错是ecshop的,那么其他系统discuz,dedecms若同样报错,解决方法同样! (责任编辑:最模板) |