PHP Insert with foreign key relation
first at all thank you very mucho for read it.
I have a problem making insert sentences.
I have the connection making right and all those things cause i can insert
that in other table
BUUUUUT in this table i have a foreign key relation with another table
called langs
so the language_id is a foreign key from langs table and i have data in
langs tabla and the information match...
but i dont know if i'm making right the query, the only int is the
language_id, others are varchar
$query = "INSERT INTO users (user_name,
user_password,name,lastname,mail,language_id) VALUES
('test','test','test','test','test',1)";
I have made this query to test if any data is inserted :( but doesnt work
Maybe someone have an ideA?
Regards
No comments:
Post a Comment