SELECT report_send_message.*,user_online.status
FROM report_send_message,user_online
WHERE report_send_message.send_by_id = user_online.user_id
and report_send_message.send_to_id = '1'
Group by report_send_message.send_by_id
SELECT DISTINCT report_send_message.*,user_online.status
FROM report_send_message,user_online
WHERE report_send_message.send_by_id = user_online.user_id
and report_send_message.send_to_id = '1' ORDER BY report_send_message ASC