Where can I find the poll name if I don’t give it a name when I create a poll? Also, I assumed the post id is the topic id that contains the poll, is that correct?
AI-generated summary
Finding Poll Name and Post ID for an Explorer Query
A user, th21, inquired about locating a poll’s name when it hasn’t been explicitly given one and assumed the post ID is the same as the topic ID containing the poll. nathank clarified that each post has its own ID, which can be found by appending .json to the post link in the browser address bar, then scrolling down to find the post of interest. The poll name should be visible there or by editing the post. Alternatively, JammyDodger shared a cheeky explorer query to look up the post ID and poll name:
-- [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
I’m afraid not - each post has its own ID. It used to be easy to see it by appending .json onto the link of the post in your browser address bar and hitting enter. However, this doesn’t seem to be the case any more as you get all the posts:
If you scroll down it you’ll eventually find the post of interest. The poll name should be in there too, but if not edit the post and you’ll see it in the markdown.
Thank you for the explanation! I will take a look.
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.
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
