First creating the table:
CREATE TABLE `db_mcms`.`pages` (
`page_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`page_name` VARCHAR( 255 ) NOT NULL,
`page_title` VARCHAR( 255 ) NOT NULL,
`viewable` TINYINT NOT NULL,
`permission` TINYINT NOT NULL
) ENGINE = INNODB;
Now trying to insert stuff:
INSERT INTO `db_mcms`.`pages` (
`page_id` ,
`page_name`,
`page_title`,
`viewable`,
`permission`
)
VALUES ("1", "edit", "Edit Your Website", "1", "0"),
("2", "index", "Edit Index Example" "1", "0"),
("3", "newpage", "New Page", "0", "0");
Gives me the error:
#1136 - Column count doesn't match value count at row 2
What am I doing wrong guys?
You are missing a comma here:
"Edit Index Example" "1"
Replace this with
"Edit Index Example", "1"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.