Mercurial > hgrepos > hgweb.cgi > s4
changeset 276:1966552d05a9
Add rowid column to view:gecoses
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Tue, 02 Aug 2016 07:19:48 +0859 |
parents | b82007959b54 |
children | cfbedd0686dd |
files | s4-funcs.sh s4-init.sh |
diffstat | 2 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/s4-funcs.sh Tue Aug 02 06:48:34 2016 +0859 +++ b/s4-funcs.sh Tue Aug 02 07:19:48 2016 +0859 @@ -2072,7 +2072,7 @@ then 'k' else '' end || a.rowid|| - ','||coalesce(val,a.name) as NAME, + ','||a.gecos as NAME, (SELECT count(author) /* Put post count for scoring 2016-08-01 */ FROM article NATURAL JOIN article_s WHERE blogid IN @@ -2084,12 +2084,11 @@ (SELECT group_concat(val, ',') FROM grp_mem_m WHERE gname='$grp' AND user=a.name AND key='team') as TEAM - from - (select rowid,name from user where name in - (select user from grp_mem where - gname=(select gname from grp where rowid=$grid))) - a left join user_s on a.name=user_s.name and key='gecos' - order by coalesce(val,a.name);" + FROM + gecoses a + WHERE name in (select user from grp_mem where + gname=(select gname from grp where rowid=$grid)) + ORDER by a.gecos;" err grpaction: `echo "$sql"` tf=$tmpd/title.$$ echo "グループ[<a href=\"?grp+$grid\">$grp<a>]参加メンバーに対する操作" > $tf
--- a/s4-init.sh Tue Aug 02 06:48:34 2016 +0859 +++ b/s4-init.sh Tue Aug 02 07:19:48 2016 +0859 @@ -76,7 +76,8 @@ foreign key(user) references user(name))" create view gecoses "AS -SELECT name, +SELECT rowid, + name, coalesce( case when (SELECT name FROM user u WHERE u.name=name) IS NOT NULL then (SELECT val FROM user_s u @@ -85,7 +86,7 @@ WHERE g.gname=name AND key='gecos') end, name) gecos -FROM (SELECT name FROM user UNION ALL SELECT gname FROM grp) a;" +FROM (SELECT rowid,name FROM user UNION ALL SELECT rowid,gname FROM grp) a;" for f in $formdir/*def; do