Jump to content

Multiple Insert - Column count doesn't match value count at row 1


boo_lolly

Recommended Posts

I cannot for the life of me figure this out. PhpMyAdmin puts there error somewhere around the word VALUES.

      INSERT INTO
        `tasks` (
          `id`,
          `challenge_id`,
          `title`,
          `frequency`,
          `category`,
          `description` 
      )
      VALUES (
        (
          "",
          12,
          "title1",
          "frequency1",
          "category1",
          "somedesc1"
        ),
        (
          "",
          12,
          "title2",
          "frequency2",
          "category2",
          "somedesc2"
        ),
        (
          "",
          12,
          "title3",
          "frequency3",
          "category3",
          "somedesc3"
        )
      ); 

 

I have not left out any columns in the query on the table `tasks`. Can anyone else see what i'm doing wrong? I've been banging my head over this for like an hour...

Try this

 

 

      INSERT INTO
        `tasks` (
          `id`,
          `challenge_id`,
          `title`,
          `frequency`,
          `category`,
          `description` 
      )
      VALUES 
        (
          "",
          12,
          "title1",
          "frequency1",
          "category1",
          "somedesc1"
        ),
        (
          "",
          12,
          "title2",
          "frequency2",
          "category2",
          "somedesc2"
        ),
        (
          "",
          12,
          "title3",
          "frequency3",
          "category3",
          "somedesc3"
        ); 

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.