Thread: Select Count
View Single Post
  #2 (permalink)  
Old 04-29-2008, 10:02 AM
felixtfelix felixtfelix is offline
Member
 
Join Date: Dec 2007
Posts: 32
felixtfelix is on a distinguished road
hi,

Can u split the code into two something like this.

select count(1)no_of_rows from module where title like 'title_value'

rs=pstmt.executeQuery();

if(rs.next())
{
if(rs.getInt("no_of_rows")<=3)
{
--code to insert the second query
}else{
--code to show the error message
}
}

Regards,
Felix
Reply With Quote