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
2009-11-11 07:40:32
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
2009-11-11 07:56:14