tomdelonge Posted January 29, 2009 Share Posted January 29, 2009 Alright. I want an initial message in a database. Then any replies to this message need to be stored in order. Kind of like a thread in a forum. I just need a good way to organize it. Any ideas? Link to comment https://forums.phpfreaks.com/topic/142902-threads-and-posts/ Share on other sites More sharing options...
ratcateme Posted January 29, 2009 Share Posted January 29, 2009 you could save it with a timestamp then query it something like SELECT * FROM `messages` ORDER BY `time` Scott. Link to comment https://forums.phpfreaks.com/topic/142902-threads-and-posts/#findComment-749189 Share on other sites More sharing options...
tomdelonge Posted January 29, 2009 Author Share Posted January 29, 2009 Yeah. Except I'll have different messages. So I couldn't select all rows. Or maybe I could select all where the thread_id was the same and then order by timestamp. I think I'll try that. Thanks. Link to comment https://forums.phpfreaks.com/topic/142902-threads-and-posts/#findComment-749197 Share on other sites More sharing options...
ober Posted January 29, 2009 Share Posted January 29, 2009 Yeah. Except I'll have different messages. So I couldn't select all rows. Or maybe I could select all where the thread_id was the same and then order by timestamp. I think I'll try that. Thanks. Bingo. Relate by ID and sort by time. Link to comment https://forums.phpfreaks.com/topic/142902-threads-and-posts/#findComment-749230 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.