可変時間から7時間カウントダウンするにはどうすればよいですか(タイムスタンプが挿入されたテーブルから時間を取得します)、可変時間から7時間後にテーブルを更新します。
私はそのようなものが必要です
$time = 2013-05-18 02:00:00 // comes from database
$target = $time + 7hours // time from database +7hours will be 2013-05-18 09:00:00
$until = $target - $time
以下のコードのようなものが必要です
if ($until > 0 ) {
echo "you need to wait for $until hours"
} else {
echo "time is ok"; // i will update a table
}