I have 2 tables. I look through the first table to find all the records that have the users email and display them, but part of the information is in the table 2. so I need to compare id (item) in table one with the one in table 2 so I can get the item�s description from table 2.
I don't see why this is a JSP question. But anyway, why don't you just write one SQL statement that joins the two tables? And stick a where-clause in it while you're doing the change. It's much more effective (both in programming time and processing time) to have the database return only the data you need.
(Your current problem is that you are trying to use the "rs" ResultSet without setting it back to its start. But write the join-SQL instead of trying to do that.)
You should get this code working in non-JSP java first. The I strongly receommend you not put the code directly within a JSP, but rather, keep it factored out in a class or bean that collects the data you want into an appropriate collection for passing to the JSP.
Moved to the JDBC forum.
Joined: Dec 21, 2004
@ Paul i see what you mean thanks got it:
@ Bear done
subject: Looping through records while looping through record