0
的,我的代碼
第一:增長場
$LogOut = $DB->prepare("UPDATE users SET online = '0', last_online = '$time', times_logged_in = times_logged_in + 1, time_spent_online = time_spent_online + $TimeSpent WHERE id = '$sessid'");
我的問題是最後的更新「time_spent_online = time_spent_online + $ TimeSpent」我怎麼格式化呢?我無法寫出數字,因爲數字取決於用戶在線的時間長短。