杨庆荣的博客

工作之余接单:公司产品展示网站建设、电商网站建设、小程序、app开发。+86 13714715608

zen cart:1264 Out of range value for column 'expiry' at row 1

点击 2381    创建时间 2011-09-20 17:46:02

这是报错了。主要问题是expiry这个字段长度不够。当然也可以改成int64来解决的。

 1264 Out of range value for column 'expiry' at row 1 
 in: 
 [insert into zc_sessions values ('ec1kktbetsq3pgk6iurvptqkk4', '191316511197', 'c2VjdXJpdHlUb2tlbnxzOjMyOiJiOWIyODU3ZGJhZTFlMjBiNWI5Njc3OTM4ZDVlZjRmMSI7Y3VzdG9tZXJzX2hvc3RfYWRkcmVzc3xzOjY6ImFwcC5wbiI7Y2FydElEfHM6MDoiIjtjYXJ0fE86MTI6InNob3BwaW5nQ2FydCI6Nzp7czo4OiJjb250ZW50cyI7YTowOnt9czo1OiJ0b3RhbCI7aTowO3M6Njoid2VpZ2h0IjtpOjA7czoxMjoiY29udGVudF90eXBlIjtiOjA7czoxODoiZnJlZV9zaGlwcGluZ19pdGVtIjtpOjA7czoyMDoiZnJlZV9zaGlwcGluZ193ZWlnaHQiO2k6MDtzOjE5OiJmcmVlX3NoaXBwaW5nX3ByaWNlIjtpOjA7fW5hdmlnYXRpb258TzoxNzoibmF2aWdhdGlvbkhpc3RvcnkiOjI6e3M6NDoicGF0aCI7YToxOntpOjA7YTo0OntzOjQ6InBhZ2UiO3M6NToiaW5kZXgiO3M6NDoibW9kZSI7czo2OiJOT05TU0wiO3M6MzoiZ2V0IjtzOjA6IiI7czo0OiJwb3N0IjthOjA6e319fXM6ODoic25hcHNob3QiO2E6MDp7fX1jaGVja192YWxpZHxzOjQ6InRydWUiO2xhbmd1YWdlfHM6NzoiZW5nbGlzaCI7bGFuZ3VhZ2VzX2lkfHM6MToiMSI7bGFuZ3VhZ2VzX2NvZGV8czoyOiJlbiI7Y3VycmVuY3l8czozOiJVU0QiO3RvZGF5X2lzfHM6MTA6IjIwMTEtMDktMjAiO3VwZGF0ZUV4cGlyYXRpb25zfGI6MTtzZXNzaW9uX2NvdW50ZXJ8YjoxO2N1c3RvbWVyc19pcF9hZGRyZXNzfHM6OToiMTI3LjAuMC4xIjs=')]

解决办法:

ALTER TABLE `zc_sessions` CHANGE `expiry` `expiry` VARCHAR( 12 ) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT '0'

上一篇: 威客经验分享
下一篇: discuz学习 2011-9-29