Hello,
I got a question which I hope you can answer. It is MySQL related. I have no problems with the PHP implementation - but here goes:
Assume a regular column with integer values like:
Columnname = SOME_INTS
1
4
2
3
"SELECT SUM(SOME_INTS) FROM table" will yield 10.
Now, for the problem.
I have a table called systemErrors.
In this table, one of my colums are named "ELAPSED_TIME" and is of type TIME (hh:mm:ss).
I would like these added together SUM-like - this means, add the entire column and return the end result. But can anyone help me doing this? If I SUM the column, I get a result as "hhmmss" and not "hh:mm:ss" as it needs to be. I have tried to look at ADDTIME but it doesn't - atleast to my knowledge - take the entire column (it takes two arguments).
To see what I mean, I have an example here with SUM:
01:06:31
+ 02:24:15
+ 02:02:56
= 53302 (SUM doesn't return as hh:mm:ss but as hhmmss)
The reason I so badly want this done is because the data must be read by thirdparty and needs to be usable for statistic output and documentation.
Can anyone shed some light on this problem? I am thinking that MySQL must have a way to do it?
Am I speaking nonsense? I will be happy to elaborate further if needed.