Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.