Package mymadrid.entite

Examples of mymadrid.entite.Match


        Vector<Match > matchVector = new Vector<Match >();
        String QuerySelect = "Select * from `match`";
        res = ste.executeQuery(QuerySelect);

        while (res.next()) {
            Match m = new Match();
            m.setId(res.getInt(1));
            m.setDate(res.getDate(2));
            m.setHomeTeam(res.getString(3));
            m.setGuestTeam(res.getString(4));
            m.setHomeScore(res.getInt(5));
            m.setGuestScore(res.getInt(6));
            matchVector.add(m);
        }
        return matchVector;
    }
View Full Code Here




    @Override
    public Match findId(int id) throws SQLException {
        Match m = null;


        String QuerySelect = "Select * from users  where id = ? ;";

        step = connect.prepareStatement(QuerySelect);
     
        res = step.executeQuery();

        while (res.next()) {
            m = new Match();
            m.setId(res.getInt("id"));
            m.setDate(res.getDate("date"));
            m.setHomeTeam(res.getString("equipe_domicile"));
            m.setGuestTeam(res.getString("equipe_invite"));
            m.setHomeScore(res.getInt("score_domicile"));
            m.setHomeScore(res.getInt("score_invite"));
       
        }

        return m;
    }
View Full Code Here

        String QuerySelect = "Select * from `match` where equipe_domicile='R. Madrid' or equipe_invite='R. Madrid' order by date";
        res = ste.executeQuery(QuerySelect);


        while (res.next()) {
            Match m = new Match();
            m.setId(res.getInt(1));
            m.setDate(res.getDate(2));
            m.setHomeTeam(res.getString(3));
            m.setGuestTeam(res.getString(4));
            m.setHomeScore(res.getInt(5));
            m.setGuestScore(res.getInt(6));
            matchVector.add(m);
        }
        return matchVector;
    }
View Full Code Here

TOP

Related Classes of mymadrid.entite.Match

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.