[ic] SQL sum function in query tag?
Joshua Lavin
interchange-users@icdevgroup.org
Tue Jan 28 17:48:00 2003
On Tuesday, January 28, 2003, at 03:04 PM, Joshua Lavin wrote:
> So, I guess the only way to make it work would be manually, dividing by
> 60, etc.
For anyone who cares, I actually made it work. Not too hard; just
convert the time to seconds, sum the rows, and convert back to time:
[query sql="select sec_to_time(sum(time_to_sec(length))) from music
where sku = [item-code]" table=music type=list]
[list]<p>Total playing time (HH:MM:SS): [sql-pos 0]</p>[/list]
[/query]
Josh