Why am I getting error #1136 - Column count doesn't match value count at row 1?

后端 未结 3 1411
梦毁少年i
梦毁少年i 2020-12-21 04:27

I get this error:

#1136 - Column count doesn\'t match value count at row 1?

When I try to do this:

INSERT INTO folding_cart         


        
3条回答
  •  悲哀的现实
    2020-12-21 05:02

    Here's what I suggest. I use the SET to insert instead of the common way to naming columns and them values. It is very simple to understand and you know which column has what. Also, to change this into an UPDATE is very simple since it's the same structure (just change the INSERT INTO to UPDATE and add a WHERE clause).

    INSERT INTO `folding_cartons` SET 
     `part_no` = '240-63100-00', 
     `description` = 'YB MV Cherry', 
     `count` = 90,
     `size` = '3 x 2-11/16 x 5-5/64', 
     `pdf_link` = 'http://www.logicpkg.com/data/hero/copies/240-63100-00.pdf', 
     `min` = 0, 
     `max` = 0, 
     `current` = 0;
    

提交回复
热议问题