$word="$timer day/s, $remainingHour hour/s";
if($timer==-1)
{
$word="The job has expired";
}
$field=timer;
if($timer==2&&$remainingHour==0&&$remainingMinutes==0&&$remainingSeconds==0)
{
$value=1;
$database->updateJobTimer($field,$value);
}
if($timer==1&&$remainingHour==0&&$remainingMinutes==0&&$remainingSeconds==0)
{
$value=0;
$database->updateJobTimer($field,$value);
}
if($timer==0&&$remainingHour==0&&$remainingMinutes==0&&$remainingSeconds==0)
{
$value=-1;
$database->updateJobTimer($field,$value);
}
\this is database file
function updateJobTimer($field, $value){
$q = "UPDATE ".TBL_JOBS." SET ".$field." = '$value' WHERE id = 281";
return mysql_query($q, $this->connection);
}
It only works when i refresh at the exact time 00:00:00, then the database decrease the value of timer.
How to make it decrease the value without my refresh or
i refresh after the exact time it will update the database and show the decreased value?
Any professional can help me please? THANKS ALOT :tntworth: :tntworth: I really need it ..