1
Guys I have the following table:
--- mensagens
id
usuario_envia
usuario_recebe
texto
data_envio
But I want to list only the "Conversations", for example, I want you to list the messages grouping them with their respective users who sent them.
In consultation SELECT * FROM mensagens ORDER BY id
will list all messages, but I want you to list by user you sent. Thank you.
SELECT * FROM messages WHERE user_send = "user id" ORDER BY id
– Raylan Soares
For example if user A sent two messages pro user B, with this query will list these two messages, I want to list only one message per user that sent
– Vinicius Silva
got it, I mean on the outside, but I think putting LIMIT 1 should work that way
– Raylan Soares