Forum Moderators: coopster

Message Too Old, No Replies

Can we work with 2 database in one mysql connection.

         

compose

12:05 am on Oct 30, 2005 (gmt 0)

10+ Year Member



Hi,

Actually i am trying to copy 100 rows from one database table on server to another database table [with diffrent structure] on same server.

i open one connection with database server. then select one databse, i run select query to fetch all rows from that first database table, now i select second database
using
mysql_select_db("DB2",$connection);

i run a for loop in this i make insert query to insert data in second database table. but all this stuff is not working...

please tell y i am not able to do this.

compose

9:54 am on Oct 31, 2005 (gmt 0)

10+ Year Member



Hi,

I am closing this thread, I got answer of it. :)

Thanx,

Vineet,