So to generate a user's "inbox", I'm guessing you would select all of the conversation_id's from the conversation_users table and save them to an array. Then you would select the messages from the messages table where the conversation_id is in the array you made that contains all of the conversation_id's for the current user and where the sender is not the current user. You group by conversation_id and choose the highest message.id from the group to be the message to display in the inbox.
At least that's my guess as to how you would do it. Is there a better way? -- 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php