Results 1 to 3 of 3

Thread: Making a forum

  1. #1

    Thread Starter
    Hyperactive Member Arrow_Raider's Avatar
    Join Date
    Dec 2001
    Location
    AVR Lovers Club
    Posts
    423

    Making a forum

    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

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    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
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  3. #3
    Hyperactive Member
    Join Date
    May 2001
    Posts
    306
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width