Getting SUM by adding time in PHP
问题 I need a MySQL query for the following. I have a table of time duration as such below: `hsncs_tbl` +----+-----------------+ | Id | time_duration | +----+-----------------+ | 1 | 0:12 | ---- ----------------- | 2 | 0:18 | ---- ----------------- Using a MySQL query, I need to be able to calculate these time duration. So from the table above I would get the answer of 0:30. I tried this code many times, but still not working SELECT SEC_TO_TIME(SUM(TIME_TO_SEC(time_duration))) FROM hsncs_tbl Here