Mercurial > hgrepos > hgweb.cgi > s4
changeset 297:8933d3701c00
Newer edited group has more precedence of sorting in group list.
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Sat, 24 Sep 2016 13:56:15 +0859 |
parents | da0a9c2380c1 |
children | ec267a1d27ee |
files | s4-funcs.sh |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/s4-funcs.sh Sat Sep 24 10:59:51 2016 +0859 +++ b/s4-funcs.sh Sat Sep 24 13:56:15 2016 +0859 @@ -1741,10 +1741,13 @@ from $tbl a left join (select $nm as name, max(case key when 'gecos' then val end) as gecos, - max(case key when 'tag' then val end) as tag + max(case key when 'tag' then val end) as tag, + max(case key when 'mtime' then val end) as mtime from ${tbl}_s group by $nm) b on a.$nm=b.name $cond $3 - order by b.tag desc, a.rowid asc" + order by b.tag desc, b.mtime desc, a.rowid asc" + # Give precedence to newer maintained groups (2016-09-24) + # Note that mtime is stored only in grp_s. err LE:sql.1="$sql" total=`query "with x as ($sql) select count(*) from x;"` echo "${entity} 一覧" | html h2