rnmcd Posted December 21, 2005 Posted December 21, 2005 I want to copy one Db table to another Db on a DIFFERENT website. Both sites are mine and hosted on TCH. How do I go about doing this? thanks. Quote
TCH-Bruce Posted December 21, 2005 Posted December 21, 2005 Use phpAdmin in cPanel to export the table from the database on the site you want to copy from. Then use phpAdmin in cPanel to create a table in the other database and then insert the data into the new table. Quote
rnmcd Posted December 21, 2005 Author Posted December 21, 2005 (edited) Use phpAdmin in cPanel to export the table from the database on the site you want to copy from. Then use phpAdmin in cPanel to create a table in the other database and then insert the data into the new table. I should have mentioned that the table already exists in the database I want to copy into. Will the "Insert" into the new database ask me if I want to overwrite the existing file or will it just overwrite without asking? Also, when exporting do I enable/check "Save as file"? Or do I just copy/paste from the first to the second table? Edited December 21, 2005 by rnmcd Quote
rnmcd Posted December 21, 2005 Author Posted December 21, 2005 Here is the "Export" from the table I want to copy from (I didn't "save as file": -- phpMyAdmin SQL Dump-- version 2.6.4-pl2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Dec 21, 2005 at 01:13 PM -- Server version: 4.0.25 -- PHP Version: 4.3.11 -- -- Database: `localme_or` -- -- -------------------------------------------------------- -- -- Table structure for table `promo` -- CREATE TABLE `promo` ( `id` int(10) NOT NULL auto_increment, `name` varchar(10) NOT NULL default '', `value` varchar(10) NOT NULL default '', `percent` varchar(4) NOT NULL default '', PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=15 ; -- -- Dumping data for table `promo` -- INSERT INTO `promo` VALUES (13, 'code', 'qwerty', '50'); INSERT INTO `promo` VALUES (1, 'active', 'yes', ''); INSERT INTO `promo` VALUES (14, 'code', 'freetest', 'free'); Do I just copy and paste this into the table that I want to copied to? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.