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
https://forums.phpfreaks.com/topic/192987-copy-row-from-another-table/
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!)

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.