foiovitor
Active member
I'm trying to get 10 threads with more replies in one month.
What I'm doing wrong?
SELECT count(*)
FROM xf_post posts, xf_thread threads
WHERE posts.thread_id=threads.thread_id
AND posts.post_date
BETWEEN UNIX_TIMESTAMP( '2016-01-01 00:00:00' )
AND UNIX_TIMESTAMP( '2016-01-31 23:59:00' )
GROUP BY threads.thread_id
ORDER BY posts DESC
LIMIT 10
What I'm doing wrong?
SELECT count(*)
FROM xf_post posts, xf_thread threads
WHERE posts.thread_id=threads.thread_id
AND posts.post_date
BETWEEN UNIX_TIMESTAMP( '2016-01-01 00:00:00' )
AND UNIX_TIMESTAMP( '2016-01-31 23:59:00' )
GROUP BY threads.thread_id
ORDER BY posts DESC
LIMIT 10