|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
VeriSign Code Signing Digital Certificates provides assurance to end users. Read about this and more in the free white paper: “How to Digitally Sign Downloadable Code for Secure Content Transfer.” Learn More! |
|
#1
|
|||
|
|||
|
Need suggestion on a forum..
I currently have a simple forum that shows the message and whom it is by... then a chance to reply... then it shows the replys. I have populated the reply list like this
<cfquery name="replies" datasource="userlogin"> SELECT * FROM Forum WHERE MessageParentID = #URL.iD# ORDER BY ID DESC </cfquery> <cfoutput query="replies"> <li><a href="viewmessage.cfm?ID=#ID#">#topic#</a> - #Author#</li> </cfoutput> That shows the most recently message first... BUT... I was wondering how i could do it so if they replied to a message that wasn't made first... how it would bump it to the top... it's probably something simple i just cant think of a way at the moment. ![]() |
|
#2
|
||||
|
||||
|
You're talking about threading.
You'd have to change your database design slightly by something like adding a field for the number of levels down the message is, a field for a sort order, or changing the parent message ID to that of the reply instead of the original message. It's somewhat complicated. Devshed doesn't do it, not a whole lot of forums do. |
|
#3
|
|||
|
|||
|
You could also just order it by something other than the ID, like by date, or you could add another column to the database specifically for ordering the results.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Need suggestion on a forum.. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|