tags:

views:

43

answers:

2

Hi,everyone while uploading the file i ll be getting upload time something and given the time duration 24hrs within that user need to download the file and edit.how i can find how much time still left to complete the task.please anyone help out..how i can give the time duration like 24hr using php/mysql

A: 

On your upload script just insert a row in a table with the upload date & time, on the download script check if that date is within 24 hours.

RageZ
A: 

When you insert your startdate, also fill in your deadline by the following SQL Statement:

INSERT INTO datefunc_test (starttime, deadline) VALUES ( NOW(), NOW()+INTERVAL 1 DAY);

You can then return the time left till deadline with the following statement:

SELECT
  TIMEDIFF(deadline, NOW()) as time_left
FROM
  datefunc_test;
Pesse