Jump to content

Copy row from another table


jamiet757

Recommended Posts

Here is my situation: I have 2 tables, "photos" and "items"

 

I am trying to copy a row from items into photos (the row is "url")

 

There is a row called "id_parent" which is the same number in both tables, so I know I can use that to copy it to the correct row in the new table.

 

Can someone help me with the syntax? I have been trying to figure this out, but I cannot. I just want to run it through phpmyadmin to copy the data to the other table, I only need to do it this one time.

Link to comment
Share on other sites

Sorry, I am really not sure how to explain it any better. I have two different tables in the same database. I want to copy a row from one to the other. Both tables also contain a row that the value is the same number in both tables, and that is how I want to determine which row gets copied to which row in the new table.

 

(See, now I just made it more complicated!)

Link to comment
Share on other sites

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.