Jump to content

Group SQL Results using a Conversation ID


JohnnyKennedy

Recommended Posts

Hey,

 

Thanks for looking at my post.  I have a quick question about how I could manage my Conversation (iPhone Style) messaging system - i.e. a private message is displayed in a stream of replies between each of the users involved.

 

So, I have two users - A and B, who are chatting with each other.  In the inbox, I'd like to have the conversation displayed but I am unsure of how to group them in a query without having each reply repeated in the result.  I guess, I'm asking how can I grab all rows that have the same conversation id, and display only one result in the users inbox.

 

The structure of my table is this:

mid (unique) | title (subject) | msg (body) | from | to | to_viewed | from_viewed | to del | from_del | sendtime | readIP | sendIP | conversation

 

 

Regards,

 

Jonathan

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.