csv批量导入出现错误 添加新商品失败! - 型号: 123 - SQL错误。检查上传目录中的错误记录。

Zen Cart的安装、设置、升级讨论和使用技巧交流

版主: shaning

csv批量导入出现错误 添加新商品失败! - 型号: 123 - SQL错误。检查上传目录中的错误记录。

帖子bowen113 » 2012-12-28 12:07

MySQL error 1292: Incorrect datetime value: '' for column 'products_date_available' at row 1
When executing:
INSERT INTO products SET
products_model = '123' ,
products_price = '118' ,
products_image = '111/0f33c5f971af71d1111b3a3858ded7a9.image.350x350.jpg' ,
products_weight = '0' ,
products_tax_class_id = '0' ,
products_date_available = '' ,
products_date_added = '2012-12-28 10:05:00' ,
products_last_modified = CURRENT_TIMESTAMP ,
products_quantity = '999' ,
master_categories_id = '2' ,
manufacturers_id = 'NULL',
products_status = '0',
metatags_title_status = '0',
metatags_products_name_status = '0',
metatags_model_status = '0',
metatags_price_status = '0',
metatags_title_tagline_status = ''
MySQL error 1292: Incorrect datetime value: '' for column 'products_date_available' at row 1
When executing:
INSERT INTO products SET
products_model = '163' ,
products_price = '118' ,
products_image = '111/a85b6209b72401661a211c270ffce82c.image.350x350.jpg' ,
products_weight = '0' ,
products_tax_class_id = '0' ,
products_date_available = '' ,
products_date_added = '2012-12-28 10:05:00' ,
products_last_modified = CURRENT_TIMESTAMP ,
products_quantity = '999' ,
master_categories_id = '2' ,
manufacturers_id = 'NULL',
products_status = '0',
metatags_title_status = '0',
metatags_products_name_status = '0',
metatags_model_status = '0',
metatags_price_status = '0',
metatags_title_tagline_status = ''
MySQL error 1292: Incorrect datetime value: '' for column 'products_date_available' at row 1
When executing:
INSERT INTO products SET
products_model = '109' ,
products_price = '138' ,
products_image = '111/f1da33d29f6cac2a8e63003bcdb9c0ff.image.350x350.jpg' ,
products_weight = '0' ,
products_tax_class_id = '0' ,
products_date_available = '' ,
products_date_added = '2012-12-28 10:05:00' ,
products_last_modified = CURRENT_TIMESTAMP ,
products_quantity = '999' ,
master_categories_id = '2' ,
manufacturers_id = 'NULL',
products_status = '0',
metatags_title_status = '0',
metatags_products_name_status = '0',
metatags_model_status = '0',
metatags_price_status = '0',
metatags_title_tagline_status = ''
MySQL error 1292: Incorrect datetime value: '' for column 'products_date_available' at row 1
When executing:
INSERT INTO products SET
products_model = '114' ,
products_price = '118' ,
products_image = '111/1331a662f2fa22878c5c37b08f68a157.image.350x350.jpg' ,
products_weight = '0' ,
products_tax_class_id = '0' ,
products_date_available = '' ,
products_date_added = '2012-12-28 10:05:00' ,
products_last_modified = CURRENT_TIMESTAMP ,
products_quantity = '999' ,
master_categories_id = '2' ,
manufacturers_id = 'NULL',
products_status = '0',
metatags_title_status = '0',
metatags_products_name_status = '0',
metatags_model_status = '0',
metatags_price_status = '0',
metatags_title_tagline_status = ''
MySQL error 1292: Incorrect datetime value: '' for column 'products_date_available' at row 1
When executing:
INSERT INTO products SET
products_model = '131' ,
products_price = '128' ,
products_image = '111/d8e86ad90b4aa1ef250c341f13af8e0f.image.350x350.jpg' ,
products_weight = '0' ,
products_tax_class_id = '0' ,
products_date_available = '' ,
products_date_added = '2012-12-28 10:05:00' ,
products_last_modified = CURRENT_TIMESTAMP ,
products_quantity = '999' ,
master_categories_id = '2' ,
manufacturers_id = 'NULL',
products_status = '0',
metatags_title_status = '0',
metatags_products_name_status = '0',
metatags_model_status = '0',
metatags_price_status = '0',
metatags_title_tagline_status = ''
MySQL error 1292: Incorrect datetime value: '' for column 'products_date_available' at row 1
When executing:
UPDATE products SET
products_price = '118' ,
products_image = '111/e185419967f8a42d674b57fe39873305.image.350x350.jpg' ,
products_weight = '0' ,
products_tax_class_id = '0' ,
products_date_available = '' ,
products_date_added = '2012-12-28 10:05:00' ,
products_last_modified = CURRENT_TIMESTAMP ,
products_quantity = '999' ,
master_categories_id = '2' ,
manufacturers_id = 'NULL',
products_status = '0',
metatags_title_status = '0',
metatags_products_name_status = '0',
metatags_model_status = '0',
metatags_price_status = '0',
metatags_title_tagline_status = ''WHERE ( `products_id` = '1' )
MySQL error 1292: Incorrect datetime value: '' for column 'products_date_available' at row 1
When executing:
INSERT INTO products SET
products_model = '83' ,
products_price = '148' ,
products_image = '111/e5d2e554afe4709fb4b1aa571612a69d.image.350x350.jpg' ,
products_weight = '0' ,
products_tax_class_id = '0' ,
products_date_available = '' ,
products_date_added = '2012-12-28 10:05:00' ,
products_last_modified = CURRENT_TIMESTAMP ,
products_quantity = '999' ,
master_categories_id = '2' ,
manufacturers_id = 'NULL',
products_status = '0',
metatags_title_status = '0',
metatags_products_name_status = '0',
metatags_model_status = '0',
metatags_price_status = '0',
metatags_title_tagline_status = ''
MySQL error 1292: Incorrect datetime value: '' for column 'products_date_available' at row 1
When executing:
INSERT INTO products SET
products_model = '156' ,
products_price = '118' ,
products_image = '111/9e5f541f4e0809e378d1713e0a13fc85.image.350x350.jpg' ,
products_weight = '0' ,
products_tax_class_id = '0' ,
products_date_available = '' ,
products_date_added = '2012-12-28 10:05:00' ,
products_last_modified = CURRENT_TIMESTAMP ,
products_quantity = '999' ,
master_categories_id = '2' ,
manufacturers_id = 'NULL',
products_status = '0',
metatags_title_status = '0',
metatags_products_name_status = '0',
metatags_model_status = '0',
metatags_price_status = '0',
metatags_title_tagline_status = ''
MySQL error 1292: Incorrect datetime value: '' for column 'products_date_available' at row 1
When executing:
INSERT INTO products SET
products_model = '148' ,
products_price = '148' ,
products_image = '111/7bd1fa4a822c7a3f68801f24c8ea131f.image.350x350.jpg' ,
products_weight = '0' ,
products_tax_class_id = '0' ,
products_date_available = '' ,
products_date_added = '2012-12-28 10:05:00' ,
products_last_modified = CURRENT_TIMESTAMP ,
products_quantity = '999' ,
master_categories_id = '2' ,
manufacturers_id = 'NULL',
products_status = '0',
metatags_title_status = '0',
metatags_products_name_status = '0',
metatags_model_status = '0',
metatags_price_status = '0',
metatags_title_tagline_status = ''
MySQL error 1292: Incorrect datetime value: '' for column 'products_date_available' at row 1
When executing:
INSERT INTO products SET
products_model = '64' ,
products_price = '128' ,
products_image = '111/e9f8122074d27da2a190ebf84f448d3b.image.350x350.jpg' ,
products_weight = '0' ,
products_tax_class_id = '0' ,
products_date_available = '' ,
products_date_added = '2012-12-28 10:05:00' ,
products_last_modified = CURRENT_TIMESTAMP ,
products_quantity = '999' ,
master_categories_id = '2' ,
manufacturers_id = 'NULL',
products_status = '0',
metatags_title_status = '0',
metatags_products_name_status = '0',
metatags_model_status = '0',
metatags_price_status = '0',
metatags_title_tagline_status = ''
MySQL error 1292: Incorrect datetime value: '' for column 'products_date_available' at row 1
When executing:
INSERT INTO products SET
products_model = '113' ,
products_price = '148' ,
products_image = '111/9341aa736fcf3fb183f7ba86e70d6826.image.350x350.jpg' ,
products_weight = '0' ,
products_tax_class_id = '0' ,
products_date_available = '' ,
products_date_added = '2012-12-28 10:05:00' ,
products_last_modified = CURRENT_TIMESTAMP ,
products_quantity = '999' ,
master_categories_id = '2' ,
manufacturers_id = 'NULL',
products_status = '0',
metatags_title_status = '0',
metatags_products_name_status = '0',
metatags_model_status = '0',
metatags_price_status = '0',
metatags_title_tagline_status = ''
MySQL error 1292: Incorrect datetime value: '' for column 'products_date_available' at row 1
When executing:
INSERT INTO products SET
products_model = '96' ,
products_price = '138' ,
products_image = '111/605ce6f11cbc7c728088c07207d22dbd.image.350x350.jpg' ,
products_weight = '0' ,
products_tax_class_id = '0' ,
products_date_available = '' ,
products_date_added = '2012-12-28 10:05:00' ,
products_last_modified = CURRENT_TIMESTAMP ,
products_quantity = '999' ,
master_categories_id = '2' ,
manufacturers_id = 'NULL',
products_status = '0',
metatags_title_status = '0',
metatags_products_name_status = '0',
metatags_model_status = '0',
metatags_price_status = '0',
metatags_title_tagline_status = ''
MySQL error 1292: Incorrect datetime value: '' for column 'products_date_available' at row 1
When executing:
INSERT INTO products SET
products_model = '125' ,
products_price = '148' ,
products_image = '111/4699e479657e851246bba16e75fe689d.image.350x350.jpg' ,
products_weight = '0' ,
products_tax_class_id = '0' ,
products_date_available = '' ,
products_date_added = '2012-12-28 10:05:00' ,
products_last_modified = CURRENT_TIMESTAMP ,
products_quantity = '999' ,
master_categories_id = '2' ,
manufacturers_id = 'NULL',
products_status = '0',
metatags_title_status = '0',
metatags_products_name_status = '0',
metatags_model_status = '0',
metatags_price_status = '0',
metatags_title_tagline_status = ''
MySQL error 1292: Incorrect datetime value: '' for column 'products_date_available' at row 1
When executing:
UPDATE products SET
products_price = '128' ,
products_image = '111/36696342ec4ac8041285543cbafc7ff9.image.350x350.jpg' ,
products_weight = '0' ,
products_tax_class_id = '0' ,
products_date_available = '' ,
products_date_added = '2012-12-28 10:05:00' ,
products_last_modified = CURRENT_TIMESTAMP ,
products_quantity = '999' ,
master_categories_id = '2' ,
manufacturers_id = 'NULL',
products_status = '0',
metatags_title_status = '0',
metatags_products_name_status = '0',
metatags_model_status = '0',
metatags_price_status = '0',
metatags_title_tagline_status = ''WHERE ( `products_id` = '2' )
MySQL error 1292: Incorrect datetime value: '' for column 'products_date_available' at row 1
When executing:
INSERT INTO products SET
products_model = '150' ,
products_price = '148' ,
products_image = '111/723114adea90dc4c5caf7cc6cef15f50.image.350x350.jpg' ,
products_weight = '0' ,
products_tax_class_id = '0' ,
products_date_available = '' ,
products_date_added = '2012-12-28 10:05:00' ,
products_last_modified = CURRENT_TIMESTAMP ,
products_quantity = '999' ,
master_categories_id = '2' ,
manufacturers_id = 'NULL',
products_status = '0',
metatags_title_status = '0',
metatags_products_name_status = '0',
metatags_model_status = '0',
metatags_price_status = '0',
metatags_title_tagline_status = ''
MySQL error 1292: Incorrect datetime value: '' for column 'products_date_available' at row 1
When executing:
INSERT INTO products SET
products_model = '67' ,
products_price = '128' ,
products_image = '111/846d41184ea617c9ad339730280107c4.image.350x350.jpg' ,
products_weight = '0' ,
products_tax_class_id = '0' ,
products_date_available = '' ,
products_date_added = '2012-12-28 10:05:00' ,
products_last_modified = CURRENT_TIMESTAMP ,
products_quantity = '999' ,
master_categories_id = '2' ,
manufacturers_id = 'NULL',
products_status = '0',
metatags_title_status = '0',
metatags_products_name_status = '0',
metatags_model_status = '0',
metatags_price_status = '0',
metatags_title_tagline_status = ''
MySQL error 1292: Incorrect datetime value: '' for column 'products_date_available' at row 1
When executing:
INSERT INTO products SET
products_model = '132' ,
products_price = '148' ,
products_image = '111/6db46aa5ff947f754506f311aae4eeca.image.350x350.jpg' ,
products_weight = '0' ,
products_tax_class_id = '0' ,
products_date_available = '' ,
products_date_added = '2012-12-28 10:05:00' ,
products_last_modified = CURRENT_TIMESTAMP ,
products_quantity = '999' ,
master_categories_id = '2' ,
manufacturers_id = 'NULL',
products_status = '0',
metatags_title_status = '0',
metatags_products_name_status = '0',
metatags_model_status = '0',
metatags_price_status = '0',
metatags_title_tagline_status = ''
MySQL error 1292: Incorrect datetime value: '' for column 'products_date_available' at row 1
When executing:
INSERT INTO products SET
products_model = '73' ,
products_price = '138' ,
products_image = '111/a5d388e182384b148392019c585bf816.image.350x350.jpg' ,
products_weight = '0' ,
products_tax_class_id = '0' ,
products_date_available = '' ,
products_date_added = '2012-12-28 10:05:00' ,
products_last_modified = CURRENT_TIMESTAMP ,
products_quantity = '999' ,
master_categories_id = '2' ,
manufacturers_id = 'NULL',
products_status = '0',
metatags_title_status = '0',
metatags_products_name_status = '0',
metatags_model_status = '0',
metatags_price_status = '0',
metatags_title_tagline_status = ''

请大神们帮帮忙。。。。。。。。。。。。。。。
bowen113
 
帖子: 4
注册: 2012-12-28 12:01
QQ 帐号: 554367018

Re: csv批量导入出现错误 添加新商品失败! - 型号: 123 - SQL错误。检查上传目录中的错误记录。

帖子Jack » 2012-12-28 12:11

products_date_available 栏目填上内容
可先下载个文件参考下格式
Zen Cart - 让每个人拥有自己生意的梦想成真
加入Zen Cart地图 | 恕不回复站内短信提问 | QQ: 3171061
头像
Jack
论坛版主
论坛版主
 
帖子: 12265
注册: 2004-12-16 10:04

Re: csv批量导入出现错误 添加新商品失败! - 型号: 123 - SQL错误。检查上传目录中的错误记录。

帖子Jack » 2012-12-28 23:07

后台下载下来的csv里没有 products_date_available 这个栏目列。。。


打开文件 \admin\easypopulate.php

找到
代码: 全选
$v_date_avail = ($v_date_avail == true) ? date("Y-m-d H:i:s",strtotime($v_date_avail)) : "";


改为
代码: 全选
$v_date_avail = ($v_date_avail == true) ? date("Y-m-d H:i:s",strtotime($v_date_avail)) : "0001-01-01 00:00:00";


(代码未经测试)
Zen Cart - 让每个人拥有自己生意的梦想成真
加入Zen Cart地图 | 恕不回复站内短信提问 | QQ: 3171061
头像
Jack
论坛版主
论坛版主
 
帖子: 12265
注册: 2004-12-16 10:04

Re: csv批量导入出现错误 添加新商品失败! - 型号: 123 - SQL错误。检查上传目录中的错误记录。

帖子bowen113 » 2012-12-29 9:01

上面解决了。。但有出现新问题了 manufacturers_id 这个字段又错了。。。。

MySQL error 1366: Incorrect integer value: 'NULL' for column 'manufacturers_id' at row 1
When executing:
INSERT INTO products SET
products_model = '123' ,
products_price = '118' ,
products_image = '111/0f33c5f971af71d1111b3a3858ded7a9.image.350x350.jpg' ,
products_weight = '0' ,
products_tax_class_id = '0' ,
products_date_available = '0001-01-01 00:00:00' ,
products_date_added = '2012-12-28 12:15:00' ,
products_last_modified = CURRENT_TIMESTAMP ,
products_quantity = '999' ,
master_categories_id = '2' ,
manufacturers_id = 'NULL',
products_status = '0',
metatags_title_status = '0',
metatags_products_name_status = '0',
metatags_model_status = '0',
metatags_price_status = '0',
metatags_title_tagline_status = ''
MySQL error 1366: Incorrect integer value: 'NULL' for column 'manufacturers_id' at row 1
When executing:
INSERT INTO products SET
bowen113
 
帖子: 4
注册: 2012-12-28 12:01
QQ 帐号: 554367018

Re: csv批量导入出现错误 添加新商品失败! - 型号: 123 - SQL错误。检查上传目录中的错误记录。

帖子Jack » 2012-12-29 10:10

同一个文件中,
找到
代码: 全选
$v_manufacturer_id = "NULL";

改为
代码: 全选
$v_manufacturer_id = 0;
Zen Cart - 让每个人拥有自己生意的梦想成真
加入Zen Cart地图 | 恕不回复站内短信提问 | QQ: 3171061
头像
Jack
论坛版主
论坛版主
 
帖子: 12265
注册: 2004-12-16 10:04

Re: csv批量导入出现错误 添加新商品失败! - 型号: 123 - SQL错误。检查上传目录中的错误记录。

帖子bowen113 » 2012-12-29 10:23

MySQL error 1366: Incorrect integer value: 'NULL' for column 'manufacturers_id' at row 1
When executing:
INSERT INTO products SET
products_model = '123' ,
products_price = '118' ,
products_image = '111/0f33c5f971af71d1111b3a3858ded7a9.image.350x350.jpg' ,
products_weight = '0' ,
products_tax_class_id = '0' ,
products_date_available = '0001-01-01 00:00:00' ,
products_date_added = '2012-12-28 12:15:00' ,
products_last_modified = CURRENT_TIMESTAMP ,
products_quantity = '999' ,
master_categories_id = '2' ,
manufacturers_id = 'NULL',
products_status = '0',
metatags_title_status = '0',
metatags_products_name_status = '0',
metatags_model_status = '0',
metatags_price_status = '0',
metatags_title_tagline_status = ''
MySQL error 1366: Incorrect integer value: 'NULL' for column 'manufacturers_id' at row 1
When executing:
INSERT INTO products SET

1.csv中加v_manufacturers_id字段 ,值设为 空,设为null,不填, 然后再上传 不行
2.改数据库manufacturers_id 默认为0,改为默认无,,都不行
看样子又只能改easypolulate.php,但不知道怎么改。。。求助。。。。。。。。。。。。。。。。。
bowen113
 
帖子: 4
注册: 2012-12-28 12:01
QQ 帐号: 554367018

Re: csv批量导入出现错误 添加新商品失败! - 型号: 123 - SQL错误。检查上传目录中的错误记录。

帖子Jack » 2012-12-29 10:52

上面说的修改了没? csv中不用添加v_manufacturers_id字段
Zen Cart - 让每个人拥有自己生意的梦想成真
加入Zen Cart地图 | 恕不回复站内短信提问 | QQ: 3171061
头像
Jack
论坛版主
论坛版主
 
帖子: 12265
注册: 2004-12-16 10:04

zencart 发帖图标 Re: csv批量导入出现错误 添加新商品失败! - 型号: 123 - SQL错误。检查上传目录中的错误记录。

帖子bowen113 » 2012-12-29 11:09

上面问题自己解决了。。原来是因为本地的关系。。改一下mysql 里面的my.ini就可以了。。。对于菜鸟来说,真不容易啊。。高兴 :D :D :D
bowen113
 
帖子: 4
注册: 2012-12-28 12:01
QQ 帐号: 554367018

Re: csv批量导入出现错误 添加新商品失败! - 型号: 123 - SQL错误。检查上传目录中的错误记录。

帖子zencarter » 2012-12-30 9:29

bowen113 写道:上面问题自己解决了。。原来是因为本地的关系。。改一下mysql 里面的my.ini就可以了。。。对于菜鸟来说,真不容易啊。。高兴 :D :D :D

改动了啥内容?
zencart/magento模板建站 - zencart/magento采集 批量评论 - QQ:631992791
头像
zencarter
VIP会员
VIP会员
 
帖子: 831
注册: 2011-06-22 15:03
地址: zencart模板建站 zencart数据采集
QQ 帐号: 631992791


下一页

  • 相关话题
    回复总数
    阅读次数
    最新文章

回到 安装设置



在线用户

正在浏览此版面的用户:没有注册用户 和 2 位游客