Click here to Skip to main content
15,910,009 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear,
I need a information accurately,I have a php project that have multiple module i need access different MySQL database.
like education module will be accessed db_education database and
business module will be accessed db_business database.Is it possible and if then can it be problem in big project like commercial project.how can i implement in project like need idea.

any help thanks in advance.

Mahmud

Software Engineer
Posted
Updated 7-Dec-11 18:32pm
v3

1 solution

Yes, it is possible.

The easiest way is to connect to the MySQL server as a user with permission to access both databases, then query the tables qualified by the database name:

SELECT name FROM db_business.contacts


If you must use separate users to access each database, you can use multiple connections.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900