FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Can we count views as well as posts?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Can we count views as well as posts? [message #17939 is a reply to message #17938] Mon, 26 April 2004 18:01 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma:
Senior Member
Administrator
Core Developer
All of FUDforum's tables have prefix, if you didn't change it during installation it is probably "fud26_". When I am referring to the "thread" table, I would actually be referring to the table called fud26_thread.

Instead of looping through each thread, you'd execute a single query that would get your either the total number of views for all threads or threads inside 1 forum.

ex. SELECT SUM(views) FROM fud26_thread WHERE forum_id=1;
SELECT forum_id,SUM(views) FROM fud26_thread GROUP BY forum_id;

Beyond that your description is fairly accurate.


FUDforum Core Developer
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Installer Logic
Next Topic: How to Change User Profiles Globally
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 03:59:40 GMT 2024

Total time taken to generate the page: 0.03803 seconds