merk
29 Aug 2001, 10:45
Lets hope someone can help me!
Basically, i am trying to select from the database, the top 10 most posts, with the most replies, which expire after 7 days regardless, ie, only posts before 7 days ago are shown, easy you might say? well i dont actually want it 7 days from the start of the THREAD, i want it 7 days from the LAST reply.
However, for the life of me, i cant think of a way to do it.
The code i tried->
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
$replycountexpire, is simply a mktime function that takes the current server timestamp and taking 7 days worth off.
code ive also tried in testing, this works, however has no date stuff, as no post table is introduced.
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Id really appreicate some help!
I just wish i had more SQL books! :(
Basically, i am trying to select from the database, the top 10 most posts, with the most replies, which expire after 7 days regardless, ie, only posts before 7 days ago are shown, easy you might say? well i dont actually want it 7 days from the start of the THREAD, i want it 7 days from the LAST reply.
However, for the life of me, i cant think of a way to do it.
The code i tried->
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
$replycountexpire, is simply a mktime function that takes the current server timestamp and taking 7 days worth off.
code ive also tried in testing, this works, however has no date stuff, as no post table is introduced.
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Id really appreicate some help!
I just wish i had more SQL books! :(