Post by scarlson43017 » Tue May 19, 2009 4:34 am

I get the following error during checkout:

Code: Select all

Error: Data too long for column 'name' at row 1
Error No: 1406
INSERT INTO order_product SET order_id = '42', product_id = '73', name = 'High Performance Options Trading CD: Covered Calls/Credit Spreads', model = 'Regular', price = '49', discount = '0', total = '49', tax = '0', quantity = '1'
Looking at the table definitions, it seems the product name can be 255 chars, but in the order_product table it can only be 64 characters. Below are the table definitions:

Code: Select all

CREATE TABLE IF NOT EXISTS `product_description` (
  `product_id` int(11) NOT NULL auto_increment,
  `language_id` int(11) NOT NULL default '1',
  `name` varchar(255) collate utf8_unicode_ci NOT NULL,
  `meta_description` varchar(66) collate utf8_unicode_ci NOT NULL,
  `description` text collate utf8_unicode_ci,
  PRIMARY KEY  (`product_id`,`language_id`),
  KEY `name` (`name`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=50 ;

Code: Select all

CREATE TABLE IF NOT EXISTS `order_download` (
  `order_download_id` int(11) NOT NULL auto_increment,
  `order_id` int(11) NOT NULL default '0',
  `order_product_id` int(11) NOT NULL default '0',
  `name` varchar(64) collate utf8_unicode_ci NOT NULL default '',
  `filename` varchar(128) collate utf8_unicode_ci NOT NULL default '',
  `mask` varchar(128) collate utf8_unicode_ci NOT NULL default '',
  `remaining` int(3) NOT NULL default '0',
  PRIMARY KEY  (`order_download_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

Newbie

Posts

Joined
Tue May 19, 2009 4:26 am

Post by Daniel » Tue May 19, 2009 5:18 am

ok i'll fix this.

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm
Who is online

Users browsing this forum: No registered users and 18 guests