I want to write a check-in/check-out feature for editing content on my site. I 
want users to be able to check out pages so that the page can't be edited by 
anyone else while they are editing. I can't rely on them to always check 
records back in so I want to write a script that will query when they checked 
it out and then if it's a certain amount of time later (like 90 minutes or 
something), to check it back in.

So, my plan is that when the user hits the "check out" button, it writes a 
check out timestamp to that record in the DB. But, I want their editing time to 
end after 90 minutes. So, if another user hits the page within that 90 minutes, 
the check out button won't show. But outside of that 90 minutes, the button 
will show and the check out time will be erased.

How do I write a script that will check if a datetime field is 90 minutes later?

Reply via email to