Welcome to WebmasterWorld Guest from 184.108.40.206
Example, the first database has news articles, the second forums, and the third a user database. These are all relating to the same site.
Is there any benefit putting them all in one db, aside from organzational issues?
Do you have to connect twice to the db, or once? Server implications?
Thats a nice nuke site you got there. I can't answer the specifics about the connections to the bases other than to note that if you're running the news out of one and the forums out of the other than the user will always be requesting from one or the other....e.g they won't be fetching news from the forum page and they won't be fetchingforum threads from the news pages. So you will be accessing one database or the other at any one time. I'm thinking there shouldn't be any noticable differences in base connection times.
The upcoming release of Nuke 5.0 has addressed the multiple database problem and now prefaces all the tables with nuke_**** so you can run simultaneous programs from one base.
Once you open a connection using mysql_connect(), that connection stays alive until you either close it or the script finishes. You can then use mysql_select_db() as you say to choose which DB to access over the connection you've opened.
This is a good point you've brought up Joe, as it makes sense to avoid (when you can) the processing overhead that connection / disconnection involves.