• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

PHP/MySQL help

jfall

Diamond Member
Hi, I'm fairly new to PHP and was looking for some suggestions on how to go about making a script.

Basically, I need to run 3 MySQL queries on three different servers at the same time and return results only from whatever server has the information (the querie search data will be taken from a form submission) . All three databases have the same table structure, but only one of the three servers will actually have the data being searched for.

For example, I have a form that asks for a username.. the username will exist in one of the three databases.. so I need to query all three and return results from the database the information was found in. I would also need some way of knowing which database it came from.

In PHP, is there any way I can connect to all three databases and run my selections on them all? Or would I have to do it one at a time?

Anyone have any pointers/ideas as to how I can go about this?
 
Tada!

Lots of helpful stuff there, including all the functions needed to connect, query and grab results from a MySql database using PHP. Enjoy!

As far as I know, you will have to create 3 connections and try them all separately, unless someone else knows a way...
 
Originally posted by: Firus
Tada!

Lots of helpful stuff there, including all the functions needed to connect, query and grab results from a MySql database using PHP. Enjoy!

As far as I know, you will have to create 3 connections and try them all separately, unless someone else knows a way...

Pretty much
 
Back
Top