Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to track time between submission and next time open same document?

Status
Not open for further replies.

rogerzebra

Technical User
May 19, 2004
216
SE
Hi all,
I'm trying to implement a tracking system on each document in the database on our system I working on. I really don't know where to start or what's the best approuch here. What I have is a submission formpage which register the date when submitted to the database.

Now I need to register when next person opens up the very same document and to track the time between when the submission is submitted to someone checks the information on the submission.

What's is the best way or solution to do that?

Worth mentioning is that I don't using a login function by this point for the system. I guess that's a necessary piece if I decide to go with a solution were I want to know who and not just when the the document was open last.

As usual I appreciate all efforts and inputs from all.
thanks
/rz
 
sleipnir214,
thanks for responding, you guys are amazing...
Yes the system register to the database both when we recieve a document and when we submit a document/formpage. The data types we are using is datetime for register and timestamp for submissions.

Now I'm trying to find out a solution on how to register when you open an already submitted document/formpage to the database.
The reason for this is that we want to track the time between a submission and the evaluation part before sending it back to client. I hope that make sense.
cheers
 
Then I would create another table in the database which tracks this.

When a user opens a previously submitted document, a script records the current time minus the time the document was submitted. That table could also record who opened the document.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Thanks again for your respond I would appreciate though if you could give me more details. Hopefully part of the code so I understand what you are trying to accomplish.

I was thinking among the line, as you mentioned add another table and when someone make a submission saving the dateinfo down to this new table aswell. Then have a submit button on the evaluation page and submit the dateinfo back to this new table in another record. But that's not the best solution I know.

I have a hard time to get what you are trying to communicate. It's not an actual document we are talking about (I should have explained that earlier) so, if I understand you right you mean to make a script that register in the database the time between the submission and the evaluation when you execute a query?
How is that working? Are we talking about open it up in a new formpage with submit buttons or???

That would be a brilliant solution and solve my problem if it's possible to get the result displayed between those two actions and in same time have data saved with just one query. Unfortunately i need your help with part of the code to solve this if that is what you mean.

again thanks for trying
 
I gather that there's a page which they visit, which is script-generated, and lists the available documents available for download. That's how I see it, anyway.

So, they select a document and via link or form, call something like "/download.php?doc=3345"

Then, in download.php, just update a database like "insert into timetable values(3345,now());"

Actual code will be hard to produce without knowing the database and environment.
 
rogerzebra:
Generally speaking, I don't provide code. I get paid to write code in PHP, so I'm not likely to do it for free.

Even if I were to write some code and post it, I have no clear idea what you are trying to do, so any code I post will likely not solve your problem.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Thanks for your input Igarner I really appreciate it.
I think that will solve my problem and that is a similar solution what I had in mind too.

sleipnir214, I think you got me wrong and I'm sorry if I didn't express myself more clear. The reason for this post was to get a second oppinion and not solve something based with just my own thoughts. I trying to solve this as effecient as possible and in the same time take good sugesstions onboard from others. I'm still in a learning curve and I never expect anyone to do the job for me.
I really didn't understood your verbal explanation in your post, but I might have understood the code you suggest.

Code:
"Hopefully part of the code so I understand what you are trying to accomplish."

Basically what I'm trying to accomplish is to keep track of the process time between two tasks and save the time frames from those two tasks to MySQL. With the instension later on, to have a graph showing the average time it takes us to respond each applicants submission to a final quote. I hope this makes sence I can't be more clear than this.
That's all.

 
I think you're trying to put the cart before the horse.

Record in a table the time you make the document (or file or whatever you want to call it) available.

Record in a table the time a user reviews the document (or file or whatever you want to call it) in a table.

The time between the two can then be calculated.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
I'm not trying anything with the exception to evaluate different ideas, and decide what's best for us thru asking questions and get others oppinion. I see what you're saying though. It's not harder than that. I also realize that it's not necessary or more effecient to create a whole new table for just adding another date column. Or am I wrong?
 
It depends. How many of these time intervals are you planning on tracking?

If you are planning on tracking the amount of time between the document's being available and a single user's reviewing it, no. You can just have two columns in one table.

If you are planning on tracking many intervals between a document's being posted and a user's reviewing it, then you'll need a separate table.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
sleipnir214,
sorry for late respond. The tracking is just for one interval but I decided to go with a new table for this anyway. Thanks a lot for your help.
/r
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top