MySQL & PHP: auto connect to DB or to properly way to pass host/db to MySQL methods

Posted by SODA on Stack Overflow See other posts from Stack Overflow or by SODA
Published on 2011-01-02T00:49:53Z Indexed on 2011/01/02 0:54 UTC
Read the original article Hit count: 242

Filed under:
|
|

Hi, does anyone know of a known method in PHP to auto connect to MySQL db/table in case an app is using multiple databases on multiple hosts?

Question 1: are there scripts around that allow to auto connect to necessary host/DB based on query?

Question 2: if above is not possible, is there a known approach to properly passing host/DB info to make sure app is properly connected before executing the query?

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql