My MySQL query is this:
INSERT INTO CONTACTER_NOUS('id_contact', 'societe', 'civilite', 'prenom', 'nom',
'adress', 'ville', 'code_postal', 'telephone', 'email',
'comment' )
VALUES ('NULL', 'TCHAP', '1', 'DIA', 'Mamadou',
'27 av de foui', 'rueil malmaison',
'92500', '0611280444', 'dzdzdzd@gmail.com',
'dzdzdz effef fefe feefefe')
MySQL responded with:
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''id_contact','societe','civilite','prenom','nom','adress',开发者_开发问答'ville','code_postal',' at line 1
Column names should not be in quotes.
INSERT INTO CONTACTER_NOUS( id_contact, societe, civilite, prenom, nom, adress...)
VALUES(...)
Column names have the ` (backtick) sign around them, or nothing is fine too. Like this:
`column-name`
or column-name
Don't put single quotes around your column names.
I think that you need to change '
to ` for your columns or just remove them completely and have just the column name.
try with
INSERT INTO CONTACTER_NOUS (`id_contact`, `societe`, `civilite`, `prenom`, `nom`,
`adress`, `ville`, `code_postal`, `telephone`, `email`, `comment` )
VALUES (NULL, 'TCHAP', '1', 'DIA', 'Mamadou',
'27 av de foui', 'rueil malmaison',
'92500', '0611280444', 'dzdzdzd@gmail.com',
'dzdzdz effef fefe feefefe')
精彩评论