Code: Select all
class DB {
function DB() {
$this->host = "localhost";
$this->db = "database";
$this->user = "root";
$this->pass = "pass";
$this->link = mysql_connect($this->host, $this->user, $this->pass);
mysql_select_db($this->db);
register_shutdown_function(array(&$this, 'close'));
}
function close() {
mysql_close($this->link);
}
}Now, with that I can only connect to one database, how would I connect to another at the same time using the same type of method? I dont have enough knowledge at this to do this on my own
Thanks.