protected function connect() { self::$dbh = mysql_pconnect(self::$dbhost, self::$user, self::$pass); if (!is_resource(self::$dbh)) { throw new Exception(); } //!is_resource( $this->dbh ) if (!mysql_select_db(self::$dbname, self::$dbh)) { throw new Exception(); } //!mysql_select_db( $this->dbname, $this->dbh ) }