The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Connecting to new database inside admincp
I have another database that I want to pull info from and show the stats on the vbulletin admincp when I login. What's the best way to connect to another database to do such things?
|
#2
|
||||
|
||||
|
#3
|
||||
|
||||
k, that was what I was planning on doing I just wanted to see if others had different methods.
Thanks. |
#4
|
||||
|
||||
Assuming its a database on the same server as the main vb one, you just need to add a database prefix to the sql. Mysql doesn't really care where tables live, and is even more than happy to join across databases.
select db1.table1.fieldA, db2.table2.fieldB from db1.table1 join db2.table2 using (fieldC) You can use the vb db wrapper for this ($vbulletin->db->query etc) |
#5
|
||||
|
||||
Quote:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|