कृपया मेरे सिंटैक्स को क्षमा करें यदि यह थोड़ा हटकर है, लेकिन मैं शायद कुछ इस तरह की कोशिश करूंगा।
SELECT people.id,
people.avatar,
people.firstname,
people.lastname,
LEFT(msg.message, 90) AS message,
msg.seen,
msg.date
FROM people
INNER JOIN (SELECT message, seen, date, sender_id
FROM messages GROUP By sender_id
ORDER By date DESC LIMIT 1) msg
ON people.id = msg.sender_id
WHERE reciever_id = '". $user_data['id'] ."'