Shoutbox

Easy way to copy data from one database table to another - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: Easy way to copy data from one database table to another (/showthread.php?tid=80935)

Easy way to copy data from one database table to another by MeEtc on 01-14-2008 at 05:03 PM

Needing some SQL help here. I'm trying to find an easier way of creating a query that will take values from a row on one table, and insert the data onto another. Most of the field names are the same, save a few.
What I want to know, is if there's an easier way than using a SELECT on the first table, saving the data to variables/an array, and using an INSERT on the second table.

I have attached a structure dump of the tables in question

Any suggestions?


RE: Easy way to copy data from one database table to another by WDZ on 01-14-2008 at 05:08 PM

http://dev.mysql.com/doc/refman/5.0/en/insert-select.html


RE: Easy way to copy data from one database table to another by markee on 01-14-2008 at 08:28 PM

You can always export out of PHPMyAdmin and import it into the new one 8-)


RE: Easy way to copy data from one database table to another by MeEtc on 01-14-2008 at 08:30 PM

a php page can't do that on its own though