| Author |
Regarding JDBC concept
|
Xavy prakash
Greenhorn
Joined: Sep 02, 2009
Posts: 3
|
|
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
Joined: Nov 06, 2000
Posts: 1506
|
|
|
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.
|
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
|
 |
Ananth Chellathurai
Ranch Hand
Joined: Nov 21, 2007
Posts: 347
|
|
|
I am not able understand either.
|
Ananth Chellathurai [Walk on software]
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32611
|
|
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
|
 |
 |
|
|
subject: Regarding JDBC concept
|
|
|