Exemplo n.º 1
0
 private static function connect()
 {
     if (!is_null(self::$dbConnection)) {
         return true;
     }
     global $conf;
     $link = @mysql_connect($conf['db_server'] . ':' . $conf['db_port'], $conf['db_user'], $conf['db_pass']);
     if (false === $link) {
         return false;
     }
     $status = @mysql_select_db($conf['db_name'], $link);
     if (false === $status) {
         return false;
     }
     self::$dbConnection = $link;
     return true;
 }