I need your help!
Problem: I have a message system between users and I need to get the last conversation of all conversations. This means, I have to get the last written message and the conversation with probably sooner message between user1 and user2.
My 'message' table structure is this:
'id' | 'uidfrom' | 'uidto' | 'content' | 'cdate'
Select * from message where uidfrom IN (select uidfrom,uidto from message order by id desc limit 0,1) AND uidto IN (select uidfrom,uidto from message order by id desc limit 0,1)