I am making a forum. I need the datagrid to show from newest to oldest. And i also need to know how to make it have a certain limit of the number of posts. Once it goes over this limit, it deletes the oldest msg to make room for the new one
Printable View
I am making a forum. I need the datagrid to show from newest to oldest. And i also need to know how to make it have a certain limit of the number of posts. Once it goes over this limit, it deletes the oldest msg to make room for the new one
You control the order of how the data is listed in the Datagrid with your SQL statement you use to load the data from the db.
Use Order BY fieldname ASC/DESC
In your SQL Select statement use "Select Top 30 From Table order by postID desc" or something similar to that to get only the last 30 posts