proctk Posted August 21, 2007 Share Posted August 21, 2007 HI I'm looking for advice on how to setup my mysql table to handle reply to messages. Below is my current table structure. I could add another column replys any help or advice is great CREATE TABLE `messagecenter` ( `message_id` int(11) NOT NULL auto_increment, `sender_id` int(11) NOT NULL, `receiver_id` int(11) NOT NULL, `subject` varchar(255) collate latin1_general_ci NOT NULL, `message` text collate latin1_general_ci NOT NULL, `date_sent` datetime NOT NULL, `opened` varchar(50) collate latin1_general_ci NOT NULL, `date_opened` datetime NOT NULL, `status_to` varchar(50) collate latin1_general_ci NOT NULL, `status_from` varchar(50) collate latin1_general_ci NOT NULL, PRIMARY KEY (`message_id`) Quote Link to comment Share on other sites More sharing options...
fenway Posted August 21, 2007 Share Posted August 21, 2007 What's to set up? You can always find threads easily enough. Quote Link to comment Share on other sites More sharing options...
proctk Posted August 21, 2007 Author Share Posted August 21, 2007 its creating the link between message that have replys associated with it Quote Link to comment Share on other sites More sharing options...
fenway Posted August 22, 2007 Share Posted August 22, 2007 Isn't a reply one where the sender is the reciever and vice versa? Quote Link to comment Share on other sites More sharing options...
proctk Posted August 22, 2007 Author Share Posted August 22, 2007 yeh, I have it working I was just wondering if there is a more effective way thanks for the help Quote Link to comment Share on other sites More sharing options...
fenway Posted August 23, 2007 Share Posted August 23, 2007 Effective how? Quote Link to comment Share on other sites More sharing options...
proctk Posted August 26, 2007 Author Share Posted August 26, 2007 I added a reply column to the table whet the message ID is added Quote Link to comment Share on other sites More sharing options...
fenway Posted August 27, 2007 Share Posted August 27, 2007 What about multiple replies? Quote Link to comment Share on other sites More sharing options...
proctk Posted August 28, 2007 Author Share Posted August 28, 2007 The reply column still works it stores the message_id I do a search for the message_id and get all matching ids from from the reply column Quote Link to comment Share on other sites More sharing options...
fenway Posted August 28, 2007 Share Posted August 28, 2007 Sure... so solved? Quote Link to comment 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.