public function open($db) { $this->db = (string) $db; $dbglobs = Globals::getDBInfo(); $host_port = (string) $dbglobs[0] . ':' . (string) $dbglobs[2]; // connection to testing database $this->connect = mysql_connect($host_port, $dbglobs[3], $dbglobs[4]) or die(mysql_error()); $select = mysql_select_db($this->db, $this->connect) or die(mysql_error()); }
public function open($db) { $this->db = (string) $db; $dbglobs = Globals::getDBInfo(); $host_port = (string) $dbglobs[0] . ':' . (string) $dbglobs[2]; //echo $host_port; // connection to testing database $this->connect = mysql_connect('localhost', $dbglobs[3], $dbglobs[4]) or die(mysql_error()); $select = mysql_select_db($this->db, $this->connect) or die(mysql_error()); //$this->connect = mysql_connect('localhost','root','') or die(mysql_error()); //$select = mysql_select_db('hacker_blog',$this->connect) or die("can't connect to blog db"); }