title: Read data by rows from ResultSet
body: <p>I have the following question, is it possible to read the data from result set by rows? For example if I have read 12 rows by the following statement:</p>
  
  <pre><code>select * from months where data = 'whatever' and place_id = '1'
  </code></pre>
  
  <p>I can read the data into a string by following code:</p>
  
  <pre><code>while (rs.next()) 
  {
      for ( int i=1, y=0; i&lt;numOfCols+1; i++,y++ ) 
  {
      out.print("&lt;td&gt;" + rs.getString(i) + "&lt;/td&gt;");
          avMaxTemp += rs.getString(i) +",";
      }
  }
  </code></pre>
  
  <p>If I change the select statement:</p>
  
  <pre><code>select * from months where data = 'whatever' and place_id in ('1', '2')
  </code></pre>
  
  <p>How will I read the second row of data into:</p>
  
  <pre><code>string avMinTemp = 
  </code></pre>
  
  <p>I tried a lot to play with the loop(s) but it never gave me the results expected. Any help greatly appriciated!!! I need to copy the second row into a string avMinTemp, the third row of data into string meanTemp and so on...</p>