Using MySQL from PHP
Subject:   Using mysql from PHP
Date:   2007-08-14 03:53:45
From:   suamya

In a single PHP code, I want to connect to two different hosts with totally different authentication information. Is it possible?

Right now snippet of my code looks something like this:
$db_list = mysql_list_dbs($conn_2);

while ($row = mysql_fetch_object($db_list)) {
echo $row->Database . "\n";

However when I try to list all the databases in host2, it instead lists the database in host1.
host1 and host2 are different machines and the databases in each of them are entirely different.

I read that the new_link parameter might be used here but I couldnt figure out how to do that.

I am new to any help would be great!!