6
Another test:
Tried to wrap connect() method by extending XoopsMySQLDatabase class:
class secondDatabase extends XoopsMySQLDatabase {
var $Host = 'localhost';
var $Database = 'second_database';
var $User = 'root';
var $Password = 'pass';
function connect($selectdb = true)
{
if (XOOPS_DB_PCONNECT == 1) {
$this->conn = @mysql_pconnect($this->Host, $this->User, $this->Password);
} else {
$this->conn = @mysql_connect($this->Host, $this->User, $this->Password);
}
if (!$this->conn) {
$this->logger->addQuery('', $this->error(), $this->errno());
return false;
}
if($selectdb != false){
if (!mysql_select_db($this->Database)) {
$this->logger->addQuery('', $this->error(), $this->errno());
return false;
}
}
return true;
}
}
and my standard query code:
$databouse = new secondDatabase();
$res = $databouse->query('SELECT my_field FROM my_table');
...[data fetch]...
... and nothing happens (even in php debug mode)