using link identifier with 2 DBs
Posted: Tue Apr 21, 2009 5:31 am
Hi,
I my form I populate 2 list boxes from different 2 databases.To distinhuish them I use a link identifier in and .
As you can see $link1 and $link2 are the same.
My question is to use a link identifer, the hostname of the databases should be different? because in the script refers only to the last opened database.
I my form I populate 2 list boxes from different 2 databases.To distinhuish them I use a link identifier in
Code: Select all
mysql_query($query, $link1)Code: Select all
mysql_query($query, $link2)Code: Select all
$link1 = @mysql_connect("localhost", "xxxx", "xxxxx");mysql_select_db("db1")
$link2 = @mysql_connect("localhost", "xxxx", "xxxxx");mysql_select_db("db2")
My question is to use a link identifer, the hostname of the databases should be different? because in the script refers only to the last opened database.