Welcome to the Question2Answer Q&A. There's also a
demo
if you just want to try it out.
Login
Login
Register
All Activity
Questions
Hot!
Unanswered
Tags
Users
Ask a Question
About
Wiki
Welcome to the Q&A for
Question2Answer
.
If you have questions about the platform,
click here to ask
and please use English.
If you just want to try Q2A, please use the
demo
, which also grants admin access.
Apr 29:
Q2A 1.5.2
Related questions
changing the category for all questions of a single tag?
How can get old style related questions section ?
Is there a way to convert the tag system category system?
How can I make the main page was just one last question?
How are "Related questions" chosen for a question that has no tags?
Is there a way to allow Moderators to access the hidden questions list?
Is there away to create an user dashboard where a user can see all the questions they have asked and answered
The meaning of the explanation of the tag of the editing screen?
How to get tags capitalized instead of lowercase?
How to let get email notification after I reply a question
All categories
Q2A Core
(3,262)
Plugins
(358)
Get the count of questions related to a tag
+1
vote
What query do I need to use to get the count of questions related to a tag?
I added some tags to the sidebar, but I'd like to add just to the right the amount of questions that use that tag as well.
tags
questions
asked
Oct 7, 2011
in
Q2A Core
by
Aslan
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1 Answer
+1
vote
Something like this:
$count = qa_db_read_one_value(
qa_db_query_sub(
'SELECT COUNT(postid) FROM ^posttags WHERE wordid=#',
$tagid
),true
);
answered
Oct 7, 2011
by
NoahY
Noah, I guess this is within a post, isn't it? I actually need to get the values globally since they'll be placed in the sidebar, just aside thir corresponding tags. Any guess?
No, that's anywhere... all you need is a word id for each tag; if your widget is showing tags, you must have the word id for each tag, no? Just pass it in as $tagid, then echo the output, $count.
Please
log in
or
register
to add a comment.