function ARC_api::db_connect in Taxonomy import/export via XML 6.2
Same name and namespace in other branches
- 5.2 arc/ARC_api.php \ARC_api::db_connect()
- 5 arc/ARC_api.php \ARC_api::db_connect()
- 6 arc/ARC_api.php \ARC_api::db_connect()
1 call to ARC_api::db_connect()
File
- arc/
ARC_api.php, line 117
Class
Code
function db_connect() {
if (!($this->db_con = @mysql_connect($this->config["db_host"], $this->config["db_user"], $this->config["db_pwd"]))) {
return $this
->error("Could not connect to database server '" . $this->config["db_host"] . "'.");
}
elseif (!($this->db = @mysql_select_db($this->config["db_name"], $this->db_con))) {
return $this
->error("Could not select database '" . $this->config["db_name"] . "'.");
}
@mysql_query('SET NAMES "utf8"');
return true;
}