Jump to content

2 mySQL Connections


Hartley

Recommended Posts

Hey,

 

There's a database which stores various applications and a separate database (different connection) that stores forum information. These are tied together through a userid column. I need to have a forum rank posted along with the application list, and was wondering if it's possible to have 2 active connections.

 

Essentially, while the rows are fetched from the database, it can pull one bit of info from the other. Is this possible or do I need to recode and merge the databases?

Link to comment
https://forums.phpfreaks.com/topic/63913-2-mysql-connections/
Share on other sites

It is possible, you can grab the userid and infor from one database and then connect to the other database and grab the data based on the userid, this would probably be really slow though.

 

What you could do is put the databases into seperate tables under one master database and use the JOIN command to put them together so you can get all of the data you need at once.

 

Hope that helps.

Link to comment
https://forums.phpfreaks.com/topic/63913-2-mysql-connections/#findComment-318664
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.