连续每次的总和

我有t11至t130,t21至t230,t31至t330和t41至t430列。

我想从每一列,但以行为基础计算时间。

我已经尝试了以下对某些行有效的方法,但并非对所有行都有效,我猜想当它们超过59时,它与秒或分钟有关?

SELECT *, TIME(t11 + t12 + t13 + t14 + t15 + t16 + t17+ t18 + t19 + t110 + t111 + t112 + t113 + t114 + t115 + t116 + t117 + t118 + t119 + t120 + t121 + t122 + t123 + t124 + t125 + t126 + t127 + t128 + t129 + t130 + t21 + t22 + t23 + t24 + t25 + t26 + t27+ t28 + t29 + t210 + t211 + t212 + t213 + t214 + t215 + t216 + t217 + t218 + t219 + t220 + t221 + t222 + t223 + t224 + t225 + t226 + t227 + t228 + t229 + t230 + t31 + t32 + t33 + t34 + t35 + t36 + t37+ t38 + t39 + t310 + t311 + t312 + t313 + t314 + t315 + t316 + t317 + t318 + t319 + t320 + t321 + t322 + t323 + t324 + t325 + t326 + t327 + t328 + t329 + t330 + t41 + t42 + t43 + t44 + t45 + t46 + t47+ t48 + t49 + t410 + t411 + t412 + t413 + t414 + t415 + t416 + t417 + t418 + t419 + t420 + t421 + t422 + t423 + t424 + t425 + t426 + t427 + t428 + t429 + t430) AS total FROM restable WHERE eid = $id AND retired='no' ORDER BY total ASC

与下面的回声

<td data-label="Club">'.$row["total"].'</td>

我需要对每一行求和以显示t11> t430的总时间。

时间以“时间”格式存储

评论