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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.