#bonita 7.x Mysql5.5

Insert foreign key failed

Please can anyone help me please,
I have 3 tables: course(idc, title), participant(idp,username) and registered. the table registered contain (#idc, #idp, date) in MySQL
I want to insert in the table registered a participant in a course.

I do that:

INSERT INTO 'registered' (idc, idp, date) VALUES (
(SELECT idc FROM course WHERE title='${title}';),
(SELECT idp FROM 'participant' WHERE 'username'='${login}';),
CURRENT_DATE);

but it doesn't work!

thanks for help!
Asma

Notifications