Home > Blockchain >  How do i fix php my admin adding multiple line records as one record
How do i fix php my admin adding multiple line records as one record

Time:03-21

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 )

here is my "data" column my "data" column

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.

  • Related