Hi,
I developed a system which use two different databases : for login database(epantau) and for system database(upentrg).
I have problem to connect both database when developing the system.
Both database cannot integrate each other.
TQ
Connecting two different databases
Moderator: General Moderators
Can you explain your problem any more?
I wouldn't normally advise spliting an application across two databases, except if its a legacy system.
However, I know that MySQL, at least, allows cross database queries, so it shouldn't be too much of a problem.
You will have to be careful and explicit about the database connection parameter to the mysql_query type calls and not let PHP use its default "last used connection"
I wouldn't normally advise spliting an application across two databases, except if its a legacy system.
However, I know that MySQL, at least, allows cross database queries, so it shouldn't be too much of a problem.
You will have to be careful and explicit about the database connection parameter to the mysql_query type calls and not let PHP use its default "last used connection"
Database Conflict??
Heya Nielsene,
OK, here's how it works - one database is for security -in which it contains all the relevant info about userid +password. I named it epantau. The other database is a working database which contains vital info about my system. I called it UPENTrg.
The idea is that to disallow users from successfully bypassing the system by simply keying in the URL name in the URL browser. Instead, every time user keyed in the (direct) address in the URL browser, my login page will appear and user had to fill in the userid and password fields. So only authorised users will have access to my system.
It seems to work in a sense that whenever I initiate the bypass test, my login page appears and I had to duly key in the id plus password, and I can only access the system after verfication. However, from that page, whenever i tried to further access the system only a blank page will appear. I suspect that this is where the mess starts - coz this is where my system will call for my other database(the working database, the life n blood of the system...grrrr). Is there a conflict when I set my system this way ?
Thanks to help...
OK, here's how it works - one database is for security -in which it contains all the relevant info about userid +password. I named it epantau. The other database is a working database which contains vital info about my system. I called it UPENTrg.
The idea is that to disallow users from successfully bypassing the system by simply keying in the URL name in the URL browser. Instead, every time user keyed in the (direct) address in the URL browser, my login page will appear and user had to fill in the userid and password fields. So only authorised users will have access to my system.
It seems to work in a sense that whenever I initiate the bypass test, my login page appears and I had to duly key in the id plus password, and I can only access the system after verfication. However, from that page, whenever i tried to further access the system only a blank page will appear. I suspect that this is where the mess starts - coz this is where my system will call for my other database(the working database, the life n blood of the system...grrrr). Is there a conflict when I set my system this way ?
Thanks to help...
- CoderGoblin
- DevNet Resident
- Posts: 1425
- Joined: Tue Mar 16, 2004 10:03 am
- Location: Aachen, Germany
Well it does commonly happen if you're integrating several third party applications into one application. Depending on their suuport/options for table prefixes, shared databases, schemas, etc at times you are forced to have a portal-style application that hits several different databases. In a lot of these cases I've seen people hack up a central authentication DB that they then use for everything (often merely setting all the appropriate cookies for the different apps on login, etc)
Its not a nice solution, but it is fairly common. Now I'm less sure as to why a person would design a system like that from the start....
Its not a nice solution, but it is fairly common. Now I'm less sure as to why a person would design a system like that from the start....