Logging in DB table using timestamp
Posted on 2010-01-04
I have a web service.. which has a method getStudentDetails(string studentID).
When i give the student id it should retrieve the student details from DB.
Now, whenever that method is called it should log the details of the call in another table.
it should log the studentID, timestamp and no. of times that studentID has been requested.
the "no.of times" column in the table is initially '0'. When the studentID is first requested it should be increase to 1. next time 2...so on unitll 5, each time changing the time stamp to current timestamp. If the timestamp difference between first request and 6th request is more than 1 hour then the "no of times" should be set to zero...
Please help me wi th the code..