![]() |
sql query to show all not active forums?
Hi,
I would like to know which mySQL query I have to run to see all forums which have 0 posts for 1 month... Any help would be appreciated. |
forums have a lastpost field which stores the dateline of the last post.
You thus need to grab the lastpost and check it against some measure of "month" one possibility: select forumid from forum where to_days(now()) - to_days(from_unixtime(lastpost)) > 30 |
thanks, it works...
is there any way I can exclude some of the forums from search? |
where forumid != x
|
It'd be AND in this particular case, as there's already a WHERE statement.
|
All times are GMT. The time now is 09:01 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|