How to connect to a DB while connected to another?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
camarosource
Forum Commoner
Posts: 77
Joined: Sat Aug 03, 2002 10:43 pm

How to connect to a DB while connected to another?

Post by camarosource »

I have a MYSQL database that my PHP script connects to and in this script I have a "WHILE" statement. In this WHILE statement I also want it to connect to another completely different database to look up information while of course still being in the WHILE execution and the database..

How can I do this without interrupting the connection to the other database? Thanks
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: How to connect to a DB while connected to another?

Post by Christopher »

Yes, you can connect to two databases.
(#10850)
camarosource
Forum Commoner
Posts: 77
Joined: Sat Aug 03, 2002 10:43 pm

Re: How to connect to a DB while connected to another?

Post by camarosource »

[Problem solved] :)
Post Reply