Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQL Count

 
Hus En
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, sorry for my bad english... anyone please help me, im struggling to get resultset from a SQL count statement..
i have 2 pages.. attendance.jsp page which takes all the necessary information entered by user and send it to the setAtnd.jsp page via ajax.. to calculate attendance i need to do a calculation which is depending on the query which executes on setAtnd page.. but im having problem in geting the correct value from the query please help..
please help me asap.. thank you
here is my code..


1) Attendance.jsp


2) setAtnd.jsp


Screen Shot 2013-03-17 at 12.35.16 PM.png
[Thumbnail for Screen Shot 2013-03-17 at 12.35.16 PM.png]
Output.. it says NaN i dont know why
 
James Boswell
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you are calling the next() method too many times. Remove the call within your while loop.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic