[solved] request that doesn't work !

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Plata
Forum Newbie
Posts: 9
Joined: Mon Jan 26, 2009 11:05 am
Location: France,Paris

[solved] request that doesn't work !

Post by Plata »

Hi everyone

I'm sorry if the question is basic but i don't arrive to find the solution for the moment :

the following request doesn't work :

Code: Select all

INSERT INTO cec_gdecarrere.dictionnaire_langue(
id_dictionnaire,
id_langue,
texte
)(
 
SELECT id_dictionnaire, 1, 'Generer un nouveau mot de passe'
FROM cec_gdecarrere.dictionnaire
[i]WHERE nom = 'GENERER_UN_NOUVEAU_MOT_DE_PASSE';[/i]
)


and mySQL told me :
#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 '' at line 9
During my searching, if you could help me please ...
thanks by advance !
Last edited by Plata on Wed Feb 18, 2009 2:48 am, edited 1 time in total.
User avatar
sergio-pro
Forum Commoner
Posts: 88
Joined: Sat Dec 27, 2008 12:26 pm

Re: request that doesn't work !

Post by sergio-pro »

Hi

Try removing ; from the select statement
Plata
Forum Newbie
Posts: 9
Joined: Mon Jan 26, 2009 11:05 am
Location: France,Paris

Re: request that doesn't work !

Post by Plata »

yeah ! It works now. I forgot the ")" at the end of the select statement and i removed the ";" so

Code: Select all

INSERT INTO cec_gdecarrere.dictionnaire_langue(
id_dictionnaire,
id_langue,
texte
)(
 
SELECT id_dictionnaire, 1, 'Addresse'
FROM cec_gdecarrere.dictionnaire
WHERE (
nom = 'ADDRESSE'
)
[b])[/b]
thanks and bye :offtopic:
Post Reply