My Requisition_details table data is like this;i will do sending email and all those things;What i want is lets take user "vijay" has rejected 4 requisitions.how to group him ;i cannot hard code it like if rs.getString("userid") .equals("vijay") then call sendemail method;i dont know which user come will come from table.how to accomplish this.
in java class i have written like this;
Hashtable ht = new Hashtable();
Connection con=DriverManager.getConnection("jdbc dbc:chaitu");
Statement stmt = con.createStatement();
ResultSet rs=stmt.executeQuery("select requistionid,status,userId from Requisition_Details");
[ March 02, 2004: Message edited by: Bear Bibeault ]
Originally posted by Nicholas Cheung:
I think this may not be a JSP problem, it should be a JDBC problem.
You can simply rewrite your query:
SELECT id, user FROM TABLE WHERE status = 'Rejected' GROUP BY user;
Does this help?
noooooooooooooo;i cant change the query
[ March 02, 2004: Message edited by: Nicholas Cheung ]