cmgmyr Posted August 1, 2007 Share Posted August 1, 2007 I have a private messaging system on my site right now thats pretty simple and gets the job done. But I want to make it better and more efficient. Right now I have: CREATE TABLE `mail` ( `mid` int(11) NOT NULL auto_increment, `uidto` int(11) NOT NULL default '0', `uidfrom` int(11) NOT NULL default '0', `subject` text NOT NULL, `message` text NOT NULL, `status` tinyint(1) NOT NULL default '0', `status2` tinyint(1) NOT NULL default '0', `date` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`mid`) ) ENGINE=MyISAM ; for the database. What I'm doing is if you reply to a message it puts the last message below it and you type your new message on top This is my reply -------------- This is this original so as you can imaging after a few messages back and fourth the body of the message gets pretty big. What I want to do is set it up kind of like Facebook. Having parent_id's for messages and having a recursive function flip through them all in a "conversation" instead of having the whole conversation in one DB entry. What do you think about doing this the new way with the recursive function? Do you forsee any problems with this? Any other ideas that you would like to pass along? Thanks, -Chris Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.