dadamssg Posted January 25, 2009 Share Posted January 25, 2009 if i have a row of data that has an (ID#,title, and description) which is a forum post for example (1234, Forum Replies, blah blah blah) how should i set up the replies and how do i query select only 1234s replies. Should i make a seperate table for just replies and have the PostId#(1234), replypostid#, and description? or should i keep all posts and replies in the same table? i just don't know how id query the the replies. Any help would be MUCH appreciated. Link to comment https://forums.phpfreaks.com/topic/142330-forum-replies/ Share on other sites More sharing options...
krv Posted January 25, 2009 Share Posted January 25, 2009 POSTS id, title, description, userid $SQL = "SELECT * FROM posts WHERE id='$_GET[id]''; REPLIES id, post_id,description,userid $SQL = "SELECT * FROM replies WHERE post_id='$_GET[id]''; try something like that. if no users then dump userid Link to comment https://forums.phpfreaks.com/topic/142330-forum-replies/#findComment-745792 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.