Posted: Fri Feb 05, 2010 11:25 am Post subject: Managing multiple PHP MySQL Connections
I m trying to create a new table on server B as like a table on server A in php script.
The steps I did are,
1. Using mysql_connect() and mysql_select_db() I established connection on Server A & B with 2 different variable sets, say variable $db1 holds the db of Server A and variable $db2 holds the db of Server B.
2. Tables are list from both the DBs
3. Needed to create missing tables on Server B [ie., copy missed tables with rows from server A to Server B]. Here, it is struggling................
How to create or copy a specific table from one server to another server or IP in PHP ???
Here is my code:
<?php
#Staging
$hostname='localhost';
$un= 'admin';
$pwd='******';
$db='instglive';
$link=mysql_connect($hostname, $un, $pwd);
if(!$link)
die('Could not connect: ' . mysql_error());
if(!mysql_select_db($db,$link))
die('Could not link db: ' . mysql_error());
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum