I have a table . In it to 4 columns
ID
with high increment,
id_user1
would be the id of the user who sent the message,
id_user2
would be the id of the user that received and the mensagem
to which it receives the message sent by id_user1
to id_user2
.
Is there any way to fetch the latest ones for a message list? I mean, we have the Whatsapp and several other applications that follow the same system as the message list, where they go up according to the latest one.
I know what to do with a DESC
, but I wanted something dynamic that shows up in real time and is separated by ide like the applications and not the ID 1 now and then the ID 1 again in the 4 or 5 and etc ... each separated and without showing the same id_user1
again ..
Do you understand?