So i was trying to add records to my database using php my admin like this:
data1
data2
data3
And since i ran into an issue where it says:
#1406 - Data too long for column 'data' at row 2
And realised that its trying to add all those lines ( one line = one new record ) as one line of data instead of making each line a record.
( I apologise for my lack of terminology I am fairly new to this )
its in varchar and should accept 255 characters max for each line
CodePudding user response:
Learn the SQL language.
It should be like this:
INSERT INTO tbl_name (data) VALUES(data1),(data2),(data3);
In the phpMyAdmin interface add one entry per field. He doesn't understand what you want by separating the lines with a line break.