0
votes

From my application registration form, I 'm trying to insert check box value into mysql table but it throw an error 1406 Data too long for column . The value of tick box is 0 or 1. and my table structure is, create table test( checkbox_response bit(1))...

I had gone through something and I found the solution for this problem. The solution is, I just changed my sql-mode SET @ @global.sql_mode = ''... After the proper insertion was happened.

Though My Datatype size is fit for check box value, Why it throws an 1406 error?

1

1 Answers

0
votes

Please use "TINYINT(1)" instead of "Bit(1)".