mysqli - Returning Sum of Total Hours in MySQL -


how return sum of hours total?

select `phpc_events`.`eid`, `phpc_occurrences`.`eid`, `phpc_events`.`uid`,  timestampdiff(hour,`phpc_occurrences`.`start_ts`,`phpc_occurrences`.`end_ts`) hours, sum(hours) total `phpc_events`  left join `phpc_occurrences`  on `phpc_events`.`eid` = `phpc_occurrences`.`eid` `phpc_events`.`catid`="3" && `phpc_events`.`uid`="1" order `phpc_occurrences`.`start_ts` 


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -