Make the anonymous account id = -1
This change also simplifies the site index query.
This commit is contained in:
parent
03d4779129
commit
0ba9e22f70
|
@ -1,10 +1,12 @@
|
|||
INSERT OR IGNORE INTO authors (
|
||||
id,
|
||||
name,
|
||||
salt,
|
||||
passhash,
|
||||
joindate,
|
||||
biography
|
||||
) VALUES (
|
||||
-1,
|
||||
'anonymous',
|
||||
'',
|
||||
'',
|
||||
|
|
|
@ -9,17 +9,6 @@ FROM
|
|||
authors
|
||||
WHERE
|
||||
posts.authorid = authors.id
|
||||
UNION
|
||||
SELECT
|
||||
posts.id,
|
||||
posts.post_title,
|
||||
posts.isanon,
|
||||
posts.post_time,
|
||||
'Anonymous'
|
||||
FROM
|
||||
posts
|
||||
WHERE
|
||||
posts.authorid = -1
|
||||
ORDER BY
|
||||
posts.post_time DESC
|
||||
LIMIT 10;
|
||||
|
|
Loading…
Reference in New Issue