PDA

View Full Version : Return X amount of new posts regardless of date


Scalemotorcars
08-18-2011, 11:22 PM
Maybe Im not looking in the wrong place. All Im looking for is the code to return x amount of new posts regardless of date.

So a basic link that could return say 50 or 100 of the latest posts.

Thanks....:D

nerbert
08-19-2011, 04:14 AM
I think this will do it:

Options > General Settings > Database Read Marking Limit = 100

Options > Message Searching Options > Maximum Search Results to Return = 100

Whatever you set for the second setting will affect all types of searches.

Scalemotorcars
08-19-2011, 12:28 PM
Thanks but that's not what Im looking for.

That limited the results to that number when someone does a regular search. Im looking for a link that simply returns the last 50 or 100 posts regardless of time frame and without using the search box.

Kind of like the Whats New in the navbar but for a set amount of posts rather then since your last visit.

Mooff
08-19-2011, 05:10 PM
i haven't looked up the database table names and field names, so that code below won't work out of the box. But something very similar to that should work:

SELECT
*
FROM
posts
WHERE
parentid > 0
ORDER BY
dateline DESC LIMIT 100

(parentid - or whatever it is actually called in the database excludes threads).

No time to start phpmyadmin in order to check the real names, sorry. Hope that code helps anyway.

Scalemotorcars
08-19-2011, 06:40 PM
Thanks Mooff:up:

The only problem is that I havent a clue how to turn that into a clickable button. Can someone decode this for me .:o