public int getTeamTemplate(String username) {
        int templateNumber = 0;
        int studentID = -1;
        PreparedStatement studentFinder = null;
        PreparedStatement templateNumberFinder = null;

        try {

            // Get student ID
            studentFinder = connect.prepareStatement(
                    " select userID from User " +
                            " where username = ?; ");
            studentFinder.setString(1, username);
            ResultSet id = studentFinder.executeQuery();
            if (id.next()) {
                studentID = id.getInt(1);
            }

            // Get the template number
            templateNumberFinder = connect.prepareStatement(
                    " select teamTemplate from Student " +
                            " where studentID = ? ; ");
            templateNumberFinder.setInt(1, studentID);
            ResultSet templateNum = templateNumberFinder.executeQuery();
            if(templateNum.next()) {
                templateNumber = templateNum.getInt(1);
            }

        } catch (SQLException sqex) {
            System.err.println(sqex.toString());
        } finally {
            if (studentFinder != null) {
                try { studentFinder.close(); }  catch (SQLException sqex) { System.err.println(sqex.toString()); }
            }
            if (templateNumberFinder != null) {
                try { templateNumberFinder.close(); }  catch (SQLException sqex) { System.err.println(sqex.toString()); }
            }
        }

        return templateNumber;

    }