Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newest post appear last. 1

Status
Not open for further replies.

brentnewbury

Programmer
May 1, 2001
30
GB
I have a small little forum and when I query the database to get the posts, the newest posts appear at the bottom. I have tried the ORDER BY PostID, but it still orders them by the newest post last. How can I make the newest post appear at the top. This is probably a little mistake by me but it aint working.

Here is my code:

SQLGetPosts1 = "SELECT * FROM " & PostsTable & " WHERE " & "ForumID='" & Request.QueryString("FORUMID") & "' ORDER BY PostID"
Set rs1 = Conn.Execute(SQLGetPosts1)

Thnx for your time,

Brent Newbury
 
SQLGetPosts1 = "SELECT * FROM " & PostsTable & " WHERE " & "ForumID='" & Request.QueryString("FORUMID") & "' ORDER BY PostID DESC"

G -GTM Solutions, Home of USITE-
-=
 
Hi Geee and JohnLing,

Thankyou very much for replying to my problem. Your solution works. Thank you again for your time.

Brent Newbury
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top