mike1313 Posted December 25, 2007 Share Posted December 25, 2007 I'm currently working on a forum system for my website it's going to be sweet and simple but I have no idea how to show the replies to each topic in a threaded format is there a tutorial anywhere so I can learn how to do this? Quote Link to comment https://forums.phpfreaks.com/topic/83176-threaded-forums/ Share on other sites More sharing options...
teng84 Posted December 25, 2007 Share Posted December 25, 2007 that is all about normalization(table linking) and proper use of get variables or session Quote Link to comment https://forums.phpfreaks.com/topic/83176-threaded-forums/#findComment-423076 Share on other sites More sharing options...
Daniel0 Posted December 25, 2007 Share Posted December 25, 2007 Have a topics table and a posts table. Use a has-many relationship to link the posts to a topic by having a column called topic_id in posts. Then you could do this to get all the posts in topic id 5: SELECT * FROM posts WHERE topic_id = 5; I'd also put the first post in the posts table as well instead of a column called body in topics or something like that. Quote Link to comment https://forums.phpfreaks.com/topic/83176-threaded-forums/#findComment-423092 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.