为探险者查询查找投票名称和post_id

如果创建投票时不为其命名,可以在哪里找到投票名称?另外,我假设帖子 ID 是包含投票的主题 ID,对吗?

1 个赞

恐怕不是——每个帖子都有自己的ID。以前很容易通过在浏览器地址栏中的帖子链接后面添加“.json”并按Enter键来查看它。但是,现在似乎不再是这样了,因为你会得到所有的帖子:

如果向下滚动,最终会找到感兴趣的帖子。投票名称也应该在里面,但如果不在,请编辑帖子,你会在markdown中看到它。

3 个赞

谢谢你的解释!我会去看看。

2 个赞

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

我以前做了一个小小的探险者查询,作为一种俏皮的查找方式,不过不确定它是否比 json 方法更容易。:slight_smile: 但这是它的样子:

-- [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