xoops forums

fply0_0

Just popping in
Posted on: 2006/7/13 14:16
fply0_0
fply0_0 (Show more)
Just popping in
Posts: 2
Since: 2006/7/13
#1

Database connection question

there are 2 databases are installed, one is the XOOPS database itself and the other is my working database let's call it new database, I'd want to know if there is a function inside XOOPS that can be used to connect the new database???

birdseed

Just popping in
Posted on: 2006/7/13 16:50
birdseed
birdseed (Show more)
Just popping in
Posts: 59
Since: 2005/2/26
#2

Re: Database connection question

Hi

No this is not possible, only that way...

$sourceConn = new XoopsMySQLDatabaseSafe();
        
$sourceConn->setLogger(XoopsLogger::instance());
        
$sourceConn->setPrefix($prefix);
        
$sourceConn->conn mysql_connect($host$username$password);
        if (
$sourceConn->conn) {
            if (!
mysql_select_db($database)) {
                
$messages[] = "Datenbank " $database " konnte nicht ausgewählt werden.";
            }


a bit ugly...

greetings
MK

fply0_0

Just popping in
Posted on: 2006/7/13 22:48
fply0_0
fply0_0 (Show more)
Just popping in
Posts: 2
Since: 2006/7/13
#3

Re: Database connection question

thx 4 that