Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public ArrayList getAllTripInfo() throws SQLException, IOException {
- Connection conn = new BaseDAO().getConnection();
- Statement stat = conn.createStatement();
- ResultSet rs = stat.executeQuery("SELECT route_short_name, route_type2_name, trip_id FROM trip_info");
- ArrayList lines = new ArrayList<>();
- while(rs.next()) {
- lines.add(rs.getString(1));
- lines.add(rs.getString(2));
- lines.add(rs.getString(3));
- }
- conn.close();
- return lines;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement