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

Home » FUDforum » How To » how many messages?
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
how many messages? [message #161935] Mon, 22 February 2010 09:48 Go to next message
rover_scan is currently offline  rover_scan   Russian Federation
Messages: 31
Registered: January 2010
Karma: 0
Member

how to display how many messages from users for a certain period of time (eg monthly)? For example
/forum/index.php?t=finduser&usr_login=&&pc=2&btn_submit=Find


not only for the entire period.

[Updated on: Mon, 22 February 2010 09:49]

Report message to a moderator

Re: how many messages? [message #161939 is a reply to message #161935] Mon, 22 February 2010 15:55 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Currently, no. Can you write a patch for us?
Re: how many messages? [message #161942 is a reply to message #161939] Mon, 22 February 2010 17:41 Go to previous messageGo to next message
rover_scan is currently offline  rover_scan   Russian Federation
Messages: 31
Registered: January 2010
Karma: 0
Member

I think this is a request

select (++user) from (table) where date (restrictions apply)

But how to make this request in fudforum? I do not quite understand where that is stored and how interconnected ...
Re: how many messages? [message #161988 is a reply to message #161942] Fri, 05 March 2010 15:06 Go to previous messageGo to next message
rover_scan is currently offline  rover_scan   Russian Federation
Messages: 31
Registered: January 2010
Karma: 0
Member

where the stored data messages? Table fud30_msg? I do not see the DATE field ... Table fud30_users with what JOIN ON?
Re: how many messages? [message #161989 is a reply to message #161988] Fri, 05 March 2010 15:52 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
You can use the post_stamp column. This may also help: fud30_msg.
Re: how many messages? [message #161990 is a reply to message #161989] Sat, 06 March 2010 06:52 Go to previous messageGo to next message
rover_scan is currently offline  rover_scan   Russian Federation
Messages: 31
Registered: January 2010
Karma: 0
Member

I think I thought so, but I do not know how bigint (20) to convert to date. In the Russian Internet, I could not find.
Re: how many messages? [message #161991 is a reply to message #161990] Sat, 06 March 2010 17:44 Go to previous messageGo to next message
rover_scan is currently offline  rover_scan   Russian Federation
Messages: 31
Registered: January 2010
Karma: 0
Member

While he had done so:

SELECT fud30_users.login AS login FROM `fud30_msg`
INNER JOIN fud30_users
ON fud30_msg.poster_id=fud30_users.id WHERE post_stamp>1257022801 AND post_stamp<1259614801

Request prompts the user for each message in December 2009. Entries are repeated. List of 4000 lines. How to calculate now the number of messages from each user? That is to get a table of two columns: USER-COUNT?
I do not know ... COUNT? How to use it here? Can use EXEL? Smile
Re: how many messages? [message #161995 is a reply to message #161991] Sun, 07 March 2010 09:00 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Try something like this (untested):

SELECT login, count(*) FROM ...
...
GROUP BY login
Re: how many messages? [message #161996 is a reply to message #161995] Sun, 07 March 2010 11:16 Go to previous message
rover_scan is currently offline  rover_scan   Russian Federation
Messages: 31
Registered: January 2010
Karma: 0
Member

Exactly! Works, thanks!


SELECT _column1_, count(*) as cnt  FROM _table_ GROUP BY _column1_ ORDER BY cnt DESC

[Updated on: Sun, 07 March 2010 18:46]

Report message to a moderator

  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: SQL errors from the API
Next Topic: Trouble implementing XML Aggregation
Goto Forum:
  

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

Current Time: Thu Nov 21 16:25:10 GMT 2024

Total time taken to generate the page: 0.02409 seconds