function connect()
 {
     if (strtoupper($this->dbType) != "MYSQL") {
         return false;
     }
     if ($this->isConnect) {
         return true;
     }
     $hostStr = "";
     if (parent::getHost() != "") {
         $hostStr .= parent::getHost();
     } else {
         return false;
     }
     if (parent::getPort() != 0) {
         $hostStr .= ":" . parent::getPort();
     }
     $this->connection = mysql_connect($hostStr, parent::getUser(), parent::getPassword(), true);
     if (!$this->connection) {
         $this->isConnect = false;
     } else {
         $db_selected = mysql_select_db($this->_dbName, $this->connection);
         if (!$db_selected) {
             $this->isConnect = false;
             $this->disconnect();
         } else {
             $this->isConnect = true;
         }
     }
     return $this->isConnect;
 }
 function connect()
 {
     if (strtoupper($this->dbType) != "POSTGRES") {
         return false;
     }
     if ($this->isConnect) {
         return true;
     }
     $connectStr = "";
     if (parent::getHost() != "") {
         $connectStr .= "host=" . parent::getHost() . " ";
     } else {
         return false;
     }
     if (parent::getPort() != 0) {
         $connectStr .= "port=" . parent::getPort() . " ";
     }
     if ($this->_dbName != "") {
         $connectStr .= "dbname=" . $this->_dbName . " ";
     } else {
         return false;
     }
     if (parent::getUser() != "") {
         $connectStr .= "user="******" ";
     } else {
         return false;
     }
     if (parent::getPassword() != "") {
         $connectStr .= "password="******" ";
     }
     $this->connection = pg_connect($connectStr);
     if (!$this->connection) {
         $this->isConnect = false;
     } else {
         $this->isConnect = true;
     }
     return $this->isConnect;
 }