Page 1 of 1

Moving Info to Another DB

Posted: Sun Apr 28, 2002 10:24 am
by Jim
Is it possible to easily move information from one database to another?

I want to move my forums on Prodigy to another db so I can create a better registration/login script. Thanks!

Posted: Sun Apr 28, 2002 2:20 pm
by sam
Here you go... A few mods to the operation at the bottom should be all you need.

http://www.evilwalrus.com/viewcode.php?codeEx=486

Code: Select all

<?
# add this to the bottom aafter the header calls (make sure you remove the rest
# make sue you have the database created.

$db = mysql_connect("localhost","root");
mysql_select_db("forum",$db);

$tables = _get_tables("over_top");
foreach($tables as $tab)&#123;
    mysql_query(_create_table($tab),$db);
    mysql_query(_dump_table($tab),$db);
&#125;
?>
Cheers Sam