messaging system
Hi. I want to create a relatively simple messaging system for the website im doing so that customers can message the website owner and vice versa. However what would be the logical approach in regard to setting up the database tables so that a customer would sent the website owner then they both reply to that message thread. but then if the customer choses to start a new message to the website owner then any replies to that message are kept seperate to any other message threads.
current i have one table:
MessageID (int)
MessageThreadID (int)
MessageUserFromID (int)
MessageUserToID (int)
MessageViewed (tinyint)
MessageSent (datetime)
MessageRead (datetime)
MessageContent (text)
MessageAttachment (varchar)
My brain has gone fuzzy and sometimes I over complicate things...Could I set up a system as described above just using one database table so that the above table is initially used to create a NEW message then any replies uses the same table, but I would then store the MessageID in the MessageThreadID of the second, third, forth.. record and filter that way?
Chris