I tried to install a new script and keep getting an error
Database access error
Any clues to why it does this. Here is part of the code.
class CMySQL
{
var $host, $sock, $port, $user, $passwd, $db, $connected, $link;
function connect()
{
if ( $this->connected )
return;
if (strlen($this->port)) $this->port = ":".$this->port;
if (strlen($this->sock)) $this->sock = ":".$this->sock;
$this->link = mysql_pconnect( $this->host . $this->port . $this->sock, $this->user, $this->passwd );
if ( $this->link )
$this->connected = TRUE;
else
$this->connected = FALSE;
}
function select_db()
{
return mysql_select_db( $this->db );
}
}
$MySQL = new CMySQL;
$MySQL->host = $db['localhost'];
$MySQL->user = $db['sexx_admin'];
$MySQL->passwd = $db['mammaw'];
$MySQL->db = $db['sexx_hunt'];
$MySQL->connected = FALSE;
$MySQL->connect();
$MySQL->select_db();
Could it be because of the CMySQL? I am using regular MySQL.
Thanks in advance