I’m learning to swim quite well ![]()
Here’s a query that shows non-PM uploads from the last 7 days, alongside a link to the originating post.
SELECT
CONCAT('<a href = "/p/', posts.id, '">', topics.title)
AS html$post,
CONCAT('<img src="', url, E'" style = "max-width: 100%\x3B">')
AS html$Image
FROM post_uploads, uploads, posts, topics
WHERE DATE(current_date) - DATE(uploads.created_at) < 7
AND post_uploads.upload_id = uploads.id
AND topics.archetype = 'regular'
AND post_uploads.post_id = posts.id
AND posts.topic_id = topics.id
ORDER BY uploads.created_at DESC
I could go on all night, but I think I should sleep and stop bumping this topic…