Reply to Re: multiple databases ( php and mysql)

Your name:

Reply:


Posted by Rik on 06/11/06 04:46

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);

And give the resource on queries:
$query_on_db1 = mysql_query($query, $db1);
$query_on_db2 = mysql_query($query, $db2);

Grtz,
--
Rik Wasmus

[Back to original 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

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