/** * Connects to a MySQL database * * @access public * @return void */ public function connect() { try { self::$_link = mysql_connect($this->host, $this->user, $this->password); $this->select(); if (self::$_link === false) { throw new Exception("No he podido conectar al servidor MySQL. "); } } catch (Exception $e) { die($e->getMessage()); } }