You are here: Re: multiple databases ( php and mysql) « PHP SQL « IT news, forums, messages
Re: multiple databases ( php and mysql)

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация