Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public List <LeaderBoardBean> getLeaderBoardBeans() throws SQLException {
- db = new DataBaseConnection();
- Connection con = db.getConnection();
- List <LeaderBoardBean> TLBBL = new ArrayList<LeaderBoardBean>();
- PreparedStatement PS =
- con.prepareStatement("SELECT account.username,player.player_id,collectiblecategory.value" +
- "INNER JOIN cabbage.player" +
- "ON account.account_id=player.account_id" +
- "INNER JOIN cabbage.collected" +
- "ON player.collected_id=collected.collected_id" +
- "INNER JOIN cabbage.livecollectible" +
- "ON collected.livecollectible_id=livecollectible.livecollectible_id" +
- "INNER JOIN cabbage.collectiblemaster" +
- "ON livecollectible.collectiblemaster_id=collectiblemaster.collectiblemaster_id" +
- "INNER JOIN cabbage.collectiblecategory" +
- "ON collectiblemaster.collectiblecategory_id=collectiblecategory.collectiblecategory_id");
- PS.execute();
- ResultSet RS = PS.getResultSet();
- if (RS.next()) {
- String UN = RS.getString("account.username");
- int PID = RS.getInt("player.player_id");
- int P = RS.getInt("collectiblecategory.value");
- LeaderBoardBean LBB = new LeaderBoardBean(UN,PID,P);
- System.out.println(LBB.toString());
- TLBBL.add(LBB);
- }
- return TLBBL;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement