Log in

View Full Version : vB integration with different databases


zjs2k
12-30-2003, 10:11 PM
I see people are making hacks to display user info or recent posts on non-vB pages, which are very nice. But I believe they all assume that the non-vB php pages do not use database or use the same database as vB. My non-vB pages has mysql queries to a database which is different from vB database. Is that possible to integrate vb user check by switching between databases? I have no intention to move all tables into one database, otherwise there will be over 100 tables in one database.

Dean C
12-31-2003, 11:28 AM
Just use the $DB_site-> class. What I'm about to do on my site is have my homepage database and forums database on the same user. That way I can call information from my homepage into the forums like so:

$DB_site->query("SELECT * FROM database.table WHERE field='value'");

zjs2k
12-31-2003, 07:05 PM
Thank you for the code!