Sunday, 15 March 2015

mysql - error code 1265 data truncated when trying to insert into table -



mysql - error code 1265 data truncated when trying to insert into table -

i having error when trying insert database:

error code 1265 info truncated on `bd_html`

here table:

create table if not exists `frame_board_intra_board` ( `bd_no` int(10) unsigned not null auto_increment, `bd_order` int(10) unsigned not null default '0', `bd_depth` int(10) unsigned not null default '0', `bd_root` int(10) unsigned not null default '0', `bd_parent` int(10) unsigned not null default '0', `ca_no` int(10) unsigned not null default '0', `bd_notice` enum('0','1') not null default '0', `userid` varchar(20) not null default '', `username` varchar(20) not null default '', `userpass` varchar(41) not null default '', `useremail` varchar(100) not null default '', `bd_secret` varchar(41) not null default '', `bd_title` varchar(255) not null default '', `bd_content` text not null, `bd_html` enum('0','1') not null default '0', `bd_nobr` enum('0','1') not null default '0', `bd_regdate` datetime default null, `bd_ip` varchar(40) not null default '', `bd_procedure` int(2) not null default '0', `bd_hit` int(10) unsigned not null default '0', `bd_vote` int(10) unsigned not null default '0', primary key (`bd_no`), key `bd_order` (`bd_order`), key `userid` (`userid`), key `username` (`username`), key `bd_title` (`bd_title`), key `bd_regdate` (`bd_regdate`), key `bd_hit` (`bd_hit`), key `bd_vote` (`bd_vote`) ) engine=myisam auto_increment=2 default charset=utf8 collate=utf8_unicode_ci;

and info trying insert:

insert `frame_board_intra_board` (`bd_no`, `bd_order`, `bd_depth`, `bd_root`, `bd_parent`, `ca_no`, `bd_notice`, `userid`, `username`, `userpass`, `useremail`, `bd_secret`, `bd_title`, `bd_content`, `bd_html`, `bd_nobr`, `bd_regdate`, `bd_ip`, `bd_procedure`, `bd_hit`, `bd_vote`) values (1, 4294967195, 0, 1, 0, 0, '0', 'test', '테스터', 'mdoh3lqbw8cku', '', '202cb962ac59075b964b07152d234b70', '인트라넷 게시판 테스트입니다.', '<p>인트라넷 게시판입니다.</p>', '', '', '2010-10-04 14:18:19', '124.137.28.78', 0, 6, 0);

i using mysql workbench when inserting database.

in databases, size of character makes difference. suspicious inserting "wide" characters in varchar fields, ok in mysql.

instead, problem on bd_html. column defined take '0' , '1' values. however, passing in ''. should utilize either null or '0'.

mysql

No comments:

Post a Comment