Código PHP:
SELECT M.msg_id, M.uid_fk, M.iframe, M.message, M.created, U.username FROM messages M, users U WHERE M.uid_fk=U.uid and M.public='1' order by M.msg_id desc
Código PHP:
SELECT M.msg_id, M.uid_fk, M.iframe, M.message, M.created, U.username, F.id_1 FROM messages M, users U, friend F WHERE M.uid_fk=U.uid and M.public='1' and F.id_1='$mi id' order by M.msg_id desc