Hello,
I have a medium size web portal and I'd like to share this I guess common isssue:
having data stored in multiple databases,
(not really for a technical need but just for mental and design order)
may cause you a problem if in performing queries... just because u select the db in use and dont specify the link to the db on which you would exec the query.
What I found is to use a class and connect on every part of the php page i need to ask to MySQL a query perform the query and close the connection.
Instead of open the connections to the needed DBs at the top of the page and then query along the script referring to the correct DB link....
What do you think? Will it cause low performance opening and closing connection on each query or group of query in a page?
Actually it should not increase the number of connection.. apart some cases where i ask DB1 then DB2 and again to DB1... so i have one or two more...
Thanks a lot
I await for some smart comment..