s4

changeset 338:291a3eeed05e

Show author in search result
author HIROSE Yuuji <yuuji@gentei.org>
date Sun, 23 Oct 2016 23:11:56 +0859
parents 48d0b6c4de65
children 47d83939666b
files s4-blog.sh
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/s4-blog.sh	Sat Oct 22 22:58:10 2016 +0859
     1.2 +++ b/s4-blog.sh	Sun Oct 23 23:11:56 2016 +0859
     1.3 @@ -532,8 +532,8 @@
     1.4       ) ar
     1.5     ON a.id=ar.id
     1.6  ), ar AS (
     1.7 - SELECT article.rowid, article.blogid, article.id, ctime, content
     1.8 - FROM	article JOIN artsm ON article.id=artsm.id
     1.9 + SELECT a.rowid, a.blogid, a.id, a.author, ctime, content
    1.10 + FROM	article a JOIN artsm ON a.id=artsm.id
    1.11   $authcond
    1.12  ), bl AS (
    1.13   SELECT blg.rid, blg.*, blog_s.val TITLE
    1.14 @@ -541,6 +541,7 @@
    1.15  )
    1.16  SELECT	bl.rid||'#'||ar.id '',
    1.17  	bl.title TITLE,
    1.18 +	(SELECT gecos FROM gecoses WHERE name=ar.author) AUTHOR,
    1.19  	substr(ctime, 0, 11) DATE,
    1.20  	substr(content, 0, 78) TEXT
    1.21  FROM ar JOIN bl