Jump to content

foreign & primary keys problem


Mamo

Recommended Posts

hi  

i have a problem and that is i created a MYSQL table with a foreign key column  referencing to a primary key column in another table that i have already inserted a values in it earlier. Now what i want to do is to insert all of the primary key's column values into the foreign key column .

thank you for reading this.

Link to comment
https://forums.phpfreaks.com/topic/277154-foreign-primary-keys-problem/
Share on other sites

I am having another problem....

i have two tables.....table '1' and table '2' , in table '1' i made a "title" column and indexed it as UNIQUE, and in table '2' i made a  "title-a" column which is foreign key to  the "title" column in the other table and "answer" column, the two of the columns ("title-a" + "answer") forms the primary key for this table.

Now, what i need is to INSERT values to the "answer" column WHERE the "title-a" column satisfies a specific condition.

Thank you for reading this.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.