dadamssg Posted January 23, 2009 Share Posted January 23, 2009 im creating a type of forum and i want the best way to tackle the responses to the first post. For each first post i have a unique id number....simple enough. How should i go about assigning another id number to the each response so i can pull them up under the post id. i don't think i should create another table, although it would organize it in the database i dunno how i could link the two together. I just need some theory here so when i go to make the selection queries i can pull up the responses to the post. thanks Link to comment https://forums.phpfreaks.com/topic/142076-solved-reply-posts/ Share on other sites More sharing options...
N1CK3RS0N Posted January 23, 2009 Share Posted January 23, 2009 Normally this is how things work with forums Each post has the following ID's: Forum ID: Says which forum, or sub-forum the post is in. Thread ID: Says which thread the post is in. Post ID: For the post. If its a new post it will create a new thread ID. So if there were 1,285 diff threads on your forums, the new thread will be id 1,286. Every post that has a the matching thread ID will be posted in that thread. Post ID's do not always increase by 1 when in a thread. If the post before you is post ID 30,500. Yours may be 30,552. This is because they include posts made in other threads as well for the post ID. Link to comment https://forums.phpfreaks.com/topic/142076-solved-reply-posts/#findComment-744042 Share on other sites More sharing options...
N1CK3RS0N Posted January 23, 2009 Share Posted January 23, 2009 Your post you just made: http://www.phpfreaks.com/forums/index.php/topic,235369.msg1093926.html#msg1093926 My post I just made: http://www.phpfreaks.com/forums/index.php/topic,235369.msg1093930.html#msg1093930 See the number after topic? They match. Thats what indicates what thread the post is on. See how the number after msg jumps by 4? Because 3 other messages were posted between yours and mine.. Link to comment https://forums.phpfreaks.com/topic/142076-solved-reply-posts/#findComment-744044 Share on other sites More sharing options...
dadamssg Posted January 23, 2009 Author Share Posted January 23, 2009 i see..thanks! Link to comment https://forums.phpfreaks.com/topic/142076-solved-reply-posts/#findComment-744048 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.