谁能解决我的问题。我有带有 time_start 'hour:minute' 和 time_end 'hour:minute' 的 mysql 表,如何获得 time_start 和 time_end 之间的累积持续时间。谢谢,
$sel = $db->query("SELECT * FROM logbook WHERE date = '$date' ");
while($sel_row = mysqli_fetch_array($sel))
{
$duration = (strtotime($sel_row['time_end'])-strtotime($sel_row['time_start']))/(60*60);
$hour = floor($duration);
$minute = ($duration - $hour)*60;
echo $hour.":".$minute;
? HERE HOW CAN I CUMULATE THE $hour:$minute
}