I'm working on a Java Web application that prints a table from a mysql database. I need to make it possible for a user to enter a position from which wants to print data. I do not know how to position in the table and print it. This is the code I have:

```
PreparedStatement sql= veza.prepareStatement("SELECT * FROM table;");
ResultSet rs = sql.executeQuery();
while (rs.next()) {
     for (int i = positionFrom; i <= positionTo; i++) {
          // ??
          int id = rs.getInt("id");
          String content= rs.getString("content");
          Date time= rs.getTimestamp("time");
          list.add(new List(id, content, time));
     }

 }

```