2020-12-20 09:16:23 +01:00
|
|
|
/*
|
|
|
|
Select the data we need to read a story (and maybe display an edit button)
|
|
|
|
*/
|
|
|
|
|
2020-05-17 18:05:00 +02:00
|
|
|
SELECT
|
|
|
|
post_title,
|
|
|
|
post_text,
|
|
|
|
posts.authorid,
|
|
|
|
posts.isanon,
|
2020-10-11 01:28:39 +02:00
|
|
|
authors.name,
|
|
|
|
views
|
2020-05-17 18:05:00 +02:00
|
|
|
FROM
|
|
|
|
posts,authors
|
|
|
|
WHERE
|
|
|
|
posts.authorid = authors.id AND
|
2021-01-10 22:34:13 +01:00
|
|
|
posts.id = :id AND
|
|
|
|
(
|
|
|
|
posts.unlisted = 1 AND
|
|
|
|
posts.hash = :hash
|
|
|
|
) OR
|
|
|
|
posts.unlisted = 0;
|