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`) Link to comment https://forums.phpfreaks.com/topic/65910-message-system/ 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. Link to comment https://forums.phpfreaks.com/topic/65910-message-system/#findComment-330071 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 Link to comment https://forums.phpfreaks.com/topic/65910-message-system/#findComment-330410 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? Link to comment https://forums.phpfreaks.com/topic/65910-message-system/#findComment-330457 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 Link to comment https://forums.phpfreaks.com/topic/65910-message-system/#findComment-331432 Share on other sites More sharing options...
fenway Posted August 23, 2007 Share Posted August 23, 2007 Effective how? Link to comment https://forums.phpfreaks.com/topic/65910-message-system/#findComment-332049 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 Link to comment https://forums.phpfreaks.com/topic/65910-message-system/#findComment-334485 Share on other sites More sharing options...
fenway Posted August 27, 2007 Share Posted August 27, 2007 What about multiple replies? Link to comment https://forums.phpfreaks.com/topic/65910-message-system/#findComment-335221 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 Link to comment https://forums.phpfreaks.com/topic/65910-message-system/#findComment-335803 Share on other sites More sharing options...
fenway Posted August 28, 2007 Share Posted August 28, 2007 Sure... so solved? Link to comment https://forums.phpfreaks.com/topic/65910-message-system/#findComment-336119 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.