Log in

View Full Version : using vB's code on another database


flat6
05-07-2004, 03:39 PM
I have another database, call it links, which contains some data that's totally unrelated to vB... just a bunch of data I need to use on another part of my website. My vB3 database is forum.

Now, I want to modify the admin panel so that everything can be run from one panel. While I'm at it, I want to code the editing of the links DB from the vB table. So, how do I use the vB style code to create my own section in the vB admin panel?

I've done a little work in the index.php and now I have the menu I want in the left hand frame, linking to links_admin.php. Inside I have some if ($_REQUEST['do'] == 'edit') type of statements. However, I got lost beyond that.

Help?

flat6
05-07-2004, 03:41 PM
For starters, in:

$translations = $DB_site->query("
SELECT languageid, text
FROM " . TABLE_PREFIX . "phrase
WHERE varname = '" . addslashes($phrase['varname']) . "' AND
languageid <> $phrase[languageid] AND
phrasetypeid = $phrase[phrasetypeid]
");

From what I've gathered, vB has it own MySQL usage class. I guess I'll need to change some things so that it accessed the links database, instead of the forum database. How would I do this?

Oh, and what is the variable $usepconnect in the connect function in the db_mysql.php code?

flat6
05-07-2004, 04:05 PM
By the way, why did the vB developers decide to use their own MySQL class? Is it faster, or should I not bother and just use regular MySQL functions with my code?