PDA

View Full Version : need help regarding showing last post of a forum


illusion
12-12-2005, 04:07 AM
Set lastpost = Server.CreateObject("ADODB.Recordset")
lastpost.ActiveConnection = MM_kms_STRING
lastpost.Source = "SELECT posts, createdBy, department, timeNdate FROM Forum.posts WHERE idThreads = '1' and postCounter = '1' ORDER BY idposts desc limit 1"
lastpost.CursorType = 0
lastpost.CursorLocation = 2
lastpost.LockType = 1
lastpost.Open()

e above statement works in a way but what i cant do is to change e idthreads to retrieve data dynamically.
is there anyway i can retrieve the idthread which is on the same row as the post.

degsy
12-13-2005, 04:17 PM
idThreads = '1'


If you are using dreamweaver then add a variable in the RecordSet Advanced dialogue.

You can set it to get the idThread value from a Request variable