changeset 437:e7ed6fa0b0d4

Remove ugly and inefficient SQL code for team listing.
author HIROSE Yuuji <yuuji@gentei.org>
date Sat, 24 Jun 2017 18:37:52 +0859
parents e1bdad674c09
children bd72a82f0a9c
files s4-funcs.sh
diffstat 1 files changed, 0 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/s4-funcs.sh	Sat Jun 24 08:00:56 2017 +0859
+++ b/s4-funcs.sh	Sat Jun 24 18:37:52 2017 +0859
@@ -2388,31 +2388,6 @@
     fi
   fi
   # New entry
-  sql="select 	/* Ahh, ugly SQL, I wanna fix... */
-	 case	/* YES, can be REMOVED if it works until 2017-07-01 */
-	 when (select user from grp_adm where
-		 gname=(select gname from grp where rowid=$grid)
-		 and user=a.name) is not null
-	      then 'k'
-	 else ''
-	 end || a.rowid||
-	 ','||a.gecos as NAME,
-	 (SELECT count(author)  /* Put post count for scoring 2016-08-01 */
-		 FROM article NATURAL JOIN article_s
-		 WHERE blogid IN
-		      (SELECT id FROM blog_s
-		       WHERE key='owner'
-			 AND val=(SELECT gname FROM grp where rowid=$grid))
-		 AND author=a.name AND key='text')
-	    as POST,
-	 (SELECT group_concat(val, ',')
-	  FROM	 grp_mem_m
-	  WHERE	 gname='$grp' AND user=a.name AND key='team') as TEAM
-	 FROM
-	 gecoses a
-	 WHERE name in (select user from grp_mem where
-		 gname=(select gname from grp where rowid=$grid))
-	 ORDER by a.gecos;"
   sql="WITH mems AS (
 	  SELECT g.rowid, name, gecos FROM grp_mem gm LEFT JOIN gecoses g
 	  ON gm.user=g.name

yatex.org