|
Posted by J.O. Aho on 06/11/06 07:27
Rik wrote:
> Harold wrote:
>> Is it possible to use more than one database ( large web application)
>> on the same web page
>
> Yes. Do you mean more than one database on the same or several servers?
>
>> if so how whould i go about it
>
>
> Same server, same rights for the user on the 2 db's:
> Don't use mysql_select_db()
> Use queries like:
> SELECT * FROM database1.table
> Different servers, or different users
> $db1 = mysql_connect($server1,$name1,$pass1);
> $db2 = mysql_connect($server2,$name2,$pass2);
you can do
mysql_select_db('database1', $db1)
mysql_select_db('database2', $db2)
and you don't have to specify the database name in the queries.
//Aho
[Back to original message]
|