Topic: 1406 Data too long for column 'zone_code' at row 1

I've had a report of this error appearing during one install.
Anyone else getting this?

~ ~ ~ ~ ~ ~
Processing Plugin: sql/plugins/mysql_uk_template_base_1.3.5a.sql
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
1406 Data too long for column 'zone_code' at row 1
in:
[INSERT INTO zen_zones (zone_country_id,zone_code,zone_name) VALUES (222, 'Inverness-shire (Lewis, Uist, Skye)', 'Inverness-shire (Lewis, Uist, Skye)');]

Thanks,
Kev

Maybe we can do away with " (Lewis, Uist, Skye) " - as people in Inverness-shire should know where they live?

Re: 1406 Data too long for column 'zone_code' at row 1

This problem arose on a server running
PHP Version 5.1.1
MySQL Server 5.0

Anyone else seeing this?

Thanks

Kev

Re: 1406 Data too long for column 'zone_code' at row 1

Zencart 1.3.5 (and 1.3.02)

CREATE TABLE zones (
  zone_id int(11) NOT NULL auto_increment,
  zone_country_id int(11) NOT NULL default '0',
  zone_code varchar(32) NOT NULL default '',
  zone_name varchar(32) NOT NULL default '',
  PRIMARY KEY  (zone_id),
  KEY idx_zone_country_id_zen (zone_country_id),
  KEY idx_zone_code_zen (zone_code)
) TYPE=MyISAM;


with only 32 characters for the zone name.

and line 241

Inverness-shire (Lewis, Uist, Skye) has 36 characters  in one place, in another for some reason the SQL has a quote before it.

and line 356

INSERT INTO zones (zone_country_id,zone_code,zone_name) VALUES (222, 'Inverness-shire (Lewis, Uist, Skye)', 'Inverness-shire (Lewis, Uist, Skye)');

Last edited by bouncingltd (30-09-2006 10:31:23)

Re: 1406 Data too long for column 'zone_code' at row 1

Thanks for that.  I'll alter the sql file.

Kev