• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regarding JDBC concept

 
Xavy prakash
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai friends....

Actualy am doing intranet application in jsp,servlets...in that attendance page,login,logout time is calculated on click....the database has the following colums staff_id,staff_name,date,staff_login,staff_logout,etc....the case is...

morning if a person login,their id,name,login time has to be taken to database...

similarly if a person logout their id,name,login,logout time has to be entered....but id,name,login time will be already enterd in a row....during logout time insert query cant be used as it get inserted in second row...so retrieval will be a problem.......

session concept is not used...........


get me a proper suggestion......regarding querry
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having a hard time understanding your request. It sounds like you are saying that duplicate recoreds were inswerted, and you are having a hard time retrieving any. Is that what is happening or can you elaborate more on the issue.
 
Ananth Chellathurai
Ranch Hand
Posts: 349
Eclipse IDE Hibernate Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not able understand either.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49367
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean how would you append logout time to a previous login? Try selecting login times for the current user, the finding the largest of those login times? You would have to read about update.

You might find setting a cookie or session number on the user's computer makes it easier to find the session.

Please be specific in your thread titles, and welcome to JavaRanch
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic