Quote:
Originally Posted by Dean C
Why make a function when you can just put$DB_site->select_db('dbname'); in your code before you run thequery, and then switch it back afterwards, seems kinda redundant 
|
cuse ill need to to do a lot of switch db
but i made it on the easyest way that can be
in init.php i added :
PHP Code:
define('PREDB','mydb.mytable');
// i need only 1 table form this db
// so why not make life eayer ?
after
PHP Code:
define('TABLE_PREFIX', $tableprefix);
and on my script its looks like that :
PHP Code:
$DB_site->query("SELECT * FROM ". PREDB ." ORDER BY id DESC LIMIT 5 ");
simeple as that.
so when i want to use my other db i use PRED in query