public int getTeamSearchResult(String search){
        PreparedStatement st = null;
        ResultSet rs = null;
        try {
            conn = dbconn.getConnection();
            st = conn.prepareStatement("SELECT * FROM match_record_2013 where event_id = ? AND team_id = ?");
            st.setInt(1, getSelectedEvent());
            st.setInt(2, Integer.parseInt(search));
            rs = st.executeQuery();
            if (rs.next()) {
                return rs.getInt("team_id");
            } else {
                return -1;
            }
        } catch (SQLException e) {
            e.printStackTrace();
        } finally {
            try{
                conn.close();
                st.close();
                rs.close();
            }catch (SQLException e) {
                System.out.println("Error closing query");
            }
        }
        return -1;
    }