添加商品报错....

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

添加商品的时候出现这个错误时怎么回事...
非常的郁闷.
帮我看下.
Warning: str_repeat() [function.str-repeat]: Second argument has to be greater than or equal to 0 in x:\xxxxx\ec\admin\includes\lib_goods.php on line 501
MySQL server error report:Array ( [0] => Array ( [message] => MySQL Query Error ) [1] => Array ( [sql] => INSERT INTO `ec`.`ecs_goods` (goods_name, goods_name_style, goods_sn, cat_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 ('dfgfgfg', '+', 'No.9961695', '406', '', '50', '60', '0','0', '0', '0', 'images/201004/1270070695319095540.jpg', 'images/201004/1270070696350432746.jpg', 'images/201004/1270070695341246345.jpg', '', '', '', '0', '1', '1', '0', '-1', '0', '0', '0', '1', '1', 0, '', '1270070696', '1270070696', '0', '-1', '0') ) [2] => Array ( [error] => Lost connection to MySQL server during query ) [3] => Array ( [errno] => 2013 ) ) MySQL server error report:Array ( [0] => Array ( [message] => MySQL Query Error ) [1] => Array ( [sql] => INSERT INTO `ec`.`ecs_goods` (goods_name, goods_name_style, goods_sn, cat_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 ('dfgfgfg', '+', 'No.9961695', '406', '', '50', '60', '0','0', '0', '0', 'images/201004/1270070695319095540.jpg', 'images/201004/1270070696350432746.jpg', 'images/201004/1270070695341246345.jpg', '', '', '', '0', '1', '1', '0', '-1', '0', '0', '0', '1', '1', 0, '', '1270070696', '1270070696', '0', '-1', '0') ) [2] => Array ( [error] => Lost connection to MySQL server during query ) [3] => Array ( [errno] => 2013 ) [4] => Array ( [message] => MySQL Query Error ) [5] => Array ( [sql] => UPDATE `ec`.`ecs_sessions` SET expiry = '1270099496', ip = '221.220.164.135', userid = '0', adminid = '1', user_name='0', user_rank='0', discount='0', email='0', data = 'a:4:{s:10:\"admin_name\";s:5:\"admin\";s:11:\"action_list\";s:3:\"all\";s:10:\"last_check\";i:1270070627;s:12:\"suppliers_id\";s:1:\"0\";}' WHERE sesskey = 'f591dea5f08449a3b353c07dc75a5a80' LIMIT 1 ) [6] => Array ( [error] => MySQL server has gone away ) [7] => Array ( [errno] => 2006 ) )

回答:
然后数据库 就停了. 停了...... 晕. 是怎么回事

解决了 解决了, 是数据库 少字段了 写不进去. 呵呵

自己做过修改了吧 默认不会有这种错误的