I have this error
Error Code: 1136 Column count doesn't match value count at row 1 INSERT INTO fgm_pastor( matriculePastor, pastorName, pastorSurname, pastorBirthdayDate, birthdayPlace, pastorFathername, pastorMothername, pastorSexe, pastorPhone, pastorEmail, dateConversion, workBeforeBibleSchool, rankProbation, areaOfCalling, nberYearArea, nbreYearDistrict, martialSituation, nationality, pastorAdresse, photoProfil, raisonIndispoMissionnaire, id) VALUES ( 'matriculetest3', 'nom test', 'prenomtest', '2013-09-12', 'Dagobert', 'mon pere resr', 'ma mere test', 'M', 'phone test', 'pastorEmail test', '2018-12-28', 'infomaticien', 'rank test', 'area test', 1, 3, 'Single test', 'Cameroun test', 'adresse test', 'phototest', 'RAS', 4 );
I already indicate values column but nothing works
here is my query please help me
INSERT INTO fgm_pastor(
matriculePastor,
pastorName,
pastorSurname,
pastorBirthdayDate,
birthdayPlace,
pastorFathername,
pastorMothername,
pastorSexe,
pastorPhone,
pastorEmail,
dateConversion,
workBeforeBibleSchool,
rankProbation,
areaOfCalling,
nberYearArea,
nbreYearDistrict,
martialSituation,
nationality,
pastorAdresse,
photoProfil,
raisonIndispoMissionnaire,
id)
VALUES
(
'matriculetest3',
'nom test',
'prenomtest',
'2013-09-12',
'Dagobert',
'mon pere resr',
'ma mere test',
'M',
'phone test',
'pastorEmail test',
'2018-12-28',
'infomaticien',
'rank test',
'area test',
1,
3,
'Single test',
'Cameroun test',
'adresse test',
'phototest',
'RAS',
4
);
here is my table structure
CREATE TABLE `fgm_pastor` (
`matriculePastor` VARCHAR (180),
`pastorName` VARCHAR (180),
`pastorSurname` VARCHAR (180),
`pastorBirthdayDate` DATE ,
`birthdayPlace` VARCHAR (180),
`pastorFatherName` VARCHAR (180),
`pastorMotherName` VARCHAR (180),
`pastorSexe` CHAR (3),
`pastorPhone` VARCHAR (180),
`pastorEmail` VARCHAR (180),
`dateConversion` DATE ,
`workBeforeBibleSchool` VARCHAR (180),
`rankProbation` VARCHAR (180),
`areaOfCalling` VARCHAR (300),
`nberYearArea` INT (11),
`nbreYearDistrict` INT (11),
`martialSituation` VARCHAR (180),
`nationality` VARCHAR (180),
`pastorAdresse` VARCHAR (300),
`photoProfil` TEXT ,
`isActif` TINYINT (1),
`raisonIndispoMissionnaire` TEXT ,
`isDelete` INT (1),
`id` INT (11)
);
Use backticks for the columns name and work . Some of your column names are MySQL reserved words and it is better not to use them as column names:
INSERT INTO fgm_pastor
( matricule, `name`, surname, birthdayDate, birthdayPlace, fatherName,
motherName, gender, phone, email, dateC, `work`, rankProbation,
areaOfCalling, nberArea,nbreDistrict, martialSituation, nationality,
adresse, picture, raisonIndis, id)
VALUES ( 'matricust3', 'nom test', 'prenomtest', '2013-09-12', 'Dagobert', 'monperesr',
'mamere', 'M', 'phone test', 'pastorEmail test', '2018-12-28', 'infomaticien', 'rank test',
'area test', 1, 3, 'Single test', 'Cameroun test',
'adresse test', 'phototest', 'RAS', 4)
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.