This is the structure I have used in the past. id user_id - Sending recipient_id - Receiving status userFolder recipientFolder subject content created modified
With the following enums (not mysql enums, but class integer/ constants). status = 0 unread, 1 read, 2 replied, 3 forwarded userFolder/recipientFolder = 0 inbox, 1 outbox, 2 spam, 3 saved, 4 deleted This allows you to use a single message for 2 users within a single row/table. Each user will see the same status as that information is shared, but the folder for each user will be different. Ala, one sent the message (outbox) while the other receives (inbox). Also when a user "deletes" the message, its not actually deleted, you just hide all deleted messages from the user, or place in the trash can. If both users set the message to deleted, delete the row literally. On Feb 23, 12:31 pm, Josh <[email protected]> wrote: > Hey euromark, > > That looks like exactly what I'm trying to do. Could you also let us know > what columns are in each table? I'm sort of following your logic, but not > 100% and I think seeing the table columns would help a lot. > > ~Josh -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
