Finding poll name and post_id for an explorer query

I made a little explorer query as a cheeky look-up a while back, though not sure if it’s any easier than the json method. :slight_smile: But here it is:

-- [params]
-- int :topic_id
-- int :post_number = 1

SELECT pl.post_id, 
       p.id,
       pl.name
FROM polls pl
JOIN posts p ON p.id = pl.post_id
WHERE p.topic_id = :topic_id
AND p.post_number = :post_number