D
Dan
I have a forum running on ASP that allows people to set how many days
they want to see of messages (cutoffdate). The board is set up with
the following select statement - "SELECT * FROM Forum WHERE
DateCreated > cutoffdate ORDER BY ThreadID, FieldSortCode" The
threadid is a sequential number for new threads and the fieldsortcode
is sequential for each reply to the parent thread. For example, a new
thread would get a threadid of 8040 and a sortcode of 8040. A reply
to this thread would get a threadid of 8040 and a sortcode of 8040.1.
It gets a bit more complicated when there's a reply to a reply...but I
think this gives an idea on how the messages are set up.
If someone comes along and replys to a post beyond the person's
cutoffdate, then the reply shows up at the very bottom of the message
board as it should based on threadid and sortcode. Is it possible to
construct a select statement that would order a message with a parent
message beyond the cutoff date at the top of the list. So when
someone replys to a message that is beyond the cutoff date, it will
show up at the top and not at the bottom? I'm thinking I might have
to order by date and sort code and not by sort code alone? Or am I
dreaming?
Dan
they want to see of messages (cutoffdate). The board is set up with
the following select statement - "SELECT * FROM Forum WHERE
DateCreated > cutoffdate ORDER BY ThreadID, FieldSortCode" The
threadid is a sequential number for new threads and the fieldsortcode
is sequential for each reply to the parent thread. For example, a new
thread would get a threadid of 8040 and a sortcode of 8040. A reply
to this thread would get a threadid of 8040 and a sortcode of 8040.1.
It gets a bit more complicated when there's a reply to a reply...but I
think this gives an idea on how the messages are set up.
If someone comes along and replys to a post beyond the person's
cutoffdate, then the reply shows up at the very bottom of the message
board as it should based on threadid and sortcode. Is it possible to
construct a select statement that would order a message with a parent
message beyond the cutoff date at the top of the list. So when
someone replys to a message that is beyond the cutoff date, it will
show up at the top and not at the bottom? I'm thinking I might have
to order by date and sort code and not by sort code alone? Or am I
dreaming?
Dan