apw Posted October 31, 2008 Share Posted October 31, 2008 Hello I'm interested in comparing two times .. from when the member submits a form, the process should start, stamping the exact time from when the member submitted the form to exactly 5-minutes (300 sceonds) afterwards, which then SQL UPDATE should update my database .. However, after hours of trying (and pulling what hair I have left on my head is pulled out) I still cannot get the script to work correctly. Could I get an example of the time to time compare with the 5-minute increase? Some problems I ran into also is if the member doesn't click any links, then the time isn't compared so I tried adding the faulty time compare time script to each and every link so the times would be compared .. unless anyone could think of another, more simple way of doing this without using cron. Thanks Quote Link to comment Share on other sites More sharing options...
akitchin Posted October 31, 2008 Share Posted October 31, 2008 UPDATE table SET stuff WHERE NOW() > form_submission_time + INTERVAL 5 MINUTE this will update table with stuff where the current time is greater than the form_submission_time column (i assume you're using DATETIME?) plus 5 minutes. if you're against using a cronjob, then you'll need to run it in the header of every script. just make sure you only run the one query, as otherwise it would become cumbersome. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.