Hello guys how we can sort the messages correctly by last msg in privat_notify.php
userA to userB : hey time 15:20
userA to userC: hey time 15:21 this message to up
shortly : like all messengers in another chats...
i dont understand why its so complex in codychat
$private = $mysqli->query("
SELECT count(*) as private_count, MAX(a.time) AS time, a.hunter, b.last_action, b.user_id, b.user_name, b.user_color, b.user_tumb, b.user_status, b.user_isverified from boom_private a inner join boom_users b on a.hunter = b.user_id
WHERE status = 0 AND target =