I am uploading multiple records right into a table within our database using MySQL. However, the next command doesn't work and throws up this error "#1136 - Column count does not match value count at row 1"... that is odd as you will find 4 posts as incorporated below:

(I have just incorporated a couple of the outcomes here to illustrate the information)

INSERT INTO state (state_id,country_id,state_name,active) VALUES (152,153),(5),(Test1,Test2),(1)

This will form multiple rows and finally seem like this:

condition_id country_id condition_title active 152 5 Test 1 1 153 5 Test 2 1

(that appears just like a table within the edit... although not made on here, sorry!)

After VALUES you might also need to place categories of 4 values should you defined 4 posts.

To place multiple rows, you have to give you the correct quantity of values for every row.

The syntax is really that you simply specify one row following the other, not posts:


Do this:

INSERT INTO state (state_id,country_id,state_name,active) VALUES ('(152,153)','(5)','(Test1,Test2)','(1)')