Author |
Topic |
|
tcadieux
Junior Member
153 Posts |
Posted - 15 March 2005 : 14:37:07
|
Is there a way to find out how many posts have been made to which Forum in how many days??
I have a particular Forum that says POSTS 5000...but that is impossible for that forum, what does this number mean, Posts, Replies, everything? |
Edited by - ruirib on 16 March 2005 10:50:11 |
|
JohnJohn1186
Junior Member
103 Posts |
Posted - 15 March 2005 : 14:38:56
|
i believe that means every time someone writes and "posts" a message, it adds one to that total. You may need to click "Update Forum Counts" under admin options. |
|
|
tcadieux
Junior Member
153 Posts |
Posted - 15 March 2005 : 14:48:53
|
ok, thx
Has anyone seen any statistical Mods?
How many posts to a particular Forum since x date? |
|
|
Podge
Support Moderator
Ireland
3775 Posts |
|
tcadieux
Junior Member
153 Posts |
Posted - 15 March 2005 : 15:22:56
|
thx |
|
|
tcadieux
Junior Member
153 Posts |
Posted - 15 March 2005 : 15:45:50
|
That does a pretty nice job, but i'm wondering if someone could help me do a Query, how many posts Per Forum Per MontH? |
|
|
wildfiction
Junior Member
167 Posts |
Posted - 15 March 2005 : 16:55:12
|
I'm looking for a similar facility. I'd like to find out how many posts per user per month (or other time period) the forum has had. I'm thinking of having a $10 or $50 prize each month and all the active posters qualify for the draw. Not sure what an active poster will be (yet) but probably more than 3 posts a day. I'd also have to make sure that posts like thanks are not counted so those would be deleted from the forums. Am I opening a can of worms here? |
|
|
tcadieux
Junior Member
153 Posts |
Posted - 16 March 2005 : 10:28:16
|
what i'm trying to do is take the current code in the above mod (thx btw) and i've added a column that i want the SQL to give me the Name of the Foruma nd the number of Posts...hoever, i get an Eggregate Error everytime i try to Edit tihs query..i have to admit it's the first time i try to do this
strSql = "SELECT COUNT(FORUM_ID) AS PostCount FROM " & strTablePrefix & "TOPICS WHERE T_DATE LIKE '" & intYear & strMonth & "%'" |
|
|
sr_erick
Senior Member
USA
1318 Posts |
Posted - 16 March 2005 : 12:27:52
|
I don't think this will be easy being the dates are not stored as datetime fields in the database. This makes it hard for a lot of things. You'll have to do some counting in the ASP code. |
Erick Snowmobile Fanatics
|
|
|
tcadieux
Junior Member
153 Posts |
Posted - 16 March 2005 : 12:38:02
|
the above code works fine for Counting the # of posts in a month though? Can you expand a little on what you meant by Counting in the ASP? |
Edited by - tcadieux on 16 March 2005 19:27:01 |
|
|
sr_erick
Senior Member
USA
1318 Posts |
Posted - 16 March 2005 : 22:50:44
|
I mean you can't subtract dates, do datediffs, or specify from here to there inside of your SQL query without first converting everything into the proper strings in asp and then changing the SQL query to accept these strings. |
Erick Snowmobile Fanatics
|
|
|
tcadieux
Junior Member
153 Posts |
Posted - 18 March 2005 : 13:21:10
|
SELECT FORUM_TOPICS.T_DATE, Count(Forum_Forum.F_TOPICS) AS PostCount, Forum_Forum.F_SUBJECT FROM Forum_Forum INNER JOIN FORUM_TOPICS ON Forum_Forum.FORUM_ID = FORUM_TOPICS.FORUM_ID WHERE (((FORUM_TOPICS.T_DATE)>='200501')) GROUP BY FORUM_TOPICS.T_DATE, Forum_Forum.F_SUBJECT;
I've got this query working, however, i want the results to look like this
For SALE = 15 Want AD = 35
Right now, this query produces a 1 for each Post in every Forum so i get this
For Sale = 1 For Sale = 1 For Sale = 1
etc
|
|
|
tcadieux
Junior Member
153 Posts |
Posted - 18 March 2005 : 13:29:20
|
i got it Working!!!
|
|
|
tcadieux
Junior Member
153 Posts |
Posted - 18 March 2005 : 13:44:01
|
Turns out i jumped the gun..
SELECT Forum_Forum.F_SUBJECT, Count(Forum_Forum.F_TOPICS) AS PostCount FROM Forum_Forum INNER JOIN FORUM_TOPICS ON Forum_Forum.FORUM_ID = FORUM_TOPICS.FORUM_ID WHERE (((FORUM_TOPICS.T_DATE)>=’200501’)) GROUP BY Forum_Forum.F_SUBJECT;
I’ve got this query working, though I am obviously missing something in my logic because it works in the Access QUERY builder but I get “Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.” When I try to run from my Web?
I’m o-so-close..
|
|
|
tcadieux
Junior Member
153 Posts |
Posted - 18 March 2005 : 15:43:23
|
I'm thoroughly confused
The T_DATE field in the Snitz Forum DB is set as a string (?)
Anyhow , in all the other existing queries, this works….
WHERE T_DATE LIKE '" & intYear & strMonth & "%'
but….. the moment I try to use that same logic in my query, I get 0 hits?
strSql = "SELECT Forum_Forum.F_SUBJECT, Count(Forum_Forum.F_TOPICS) AS PostCount " strSql = strSql & "FROM Forum_Forum INNER JOIN FORUM_TOPICS ON Forum_Forum.FORUM_ID = FORUM_TOPICS.FORUM_ID " 'strSql = strSql & "WHERE (((FORUM_TOPICS.T_DATE) LIKE '" & intYear & strMonth & "%')) " 'ß = 200501 strSql = strSql & "GROUP BY Forum_Forum.F_SUBJECT"
Using (((FORUM_TOPICS.T_DATE) >= '200501%')) works BUT…
I get the same hits for 200501, 200502, 200503, etc.?
|
|
|
tcadieux
Junior Member
153 Posts |
Posted - 28 March 2005 : 20:16:25
|
anyone? |
|
|
|
Topic |
|