Bubba
Posts: 33
|
| Posted: 12/06/2007, 10:53 PM |
|
Hi all,
thought I would share my work around with you. I have seen a lot people ask how to include reply counts in the CodeChargre forum. After a LOT of mucking around I figured it out.
Step 1
Change the data source of the "messages" grid to SQL
Step 2
Select the SQL source and put this query in:
SELECT DISTINCT forum_messages_1.message_id, forum_messages_1.message_title, Count(forum_messages.message_id_parent) AS CountOfmessage_id_parent, forum_messages_1.author, forum_messages_1.date_add, forum_messages_1.smile_id
FROM forum_messages INNER JOIN forum_messages AS forum_messages_1 ON forum_messages.message_id_parent = forum_messages_1.message_id
GROUP BY forum_messages_1.message_id, forum_messages_1.message_title, forum_messages_1.author, forum_messages_1.date_add, forum_messages_1.smile_id
HAVING (((Count(forum_messages.message_id_parent))<>0));
Step 3
Add a new label to your messages grid, and select "CountOfmessage_id_parent" as the control source. This will display a reply count for each message.
That's it!
I am using an Access DB.
If this doesn't work for you, I am sorry, but I will not be answering any questions about how to make it work for you.
This should be enough to help you figure it out, and maybe the developers from Yes Software may consider adding this function in the next CodeChargs update ;)
enjoy!
|
 |
 |
|