Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. public ArrayList getAllTripInfo() throws SQLException, IOException {
  2. Connection conn = new BaseDAO().getConnection();
  3. Statement stat = conn.createStatement();
  4. ResultSet rs = stat.executeQuery("SELECT route_short_name, route_type2_name, trip_id FROM trip_info");
  5.  
  6. ArrayList lines = new ArrayList<>();
  7. while(rs.next()) {
  8. lines.add(rs.getString(1));
  9. lines.add(rs.getString(2));
  10. lines.add(rs.getString(3));
  11. }
  12. conn.close();
  13.  
  14. return lines;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement