in reply to Re^4: output results from sql join
in thread output results from sql join

SELECT M.userid,

userid is a field in table users not in msg. Try

SELECT SND.userid, SND.firstname, SND.lastname FROM msg as M JOIN users as SND ON SND.userid = M.msg_from WHERE M.msg_to = ? AND M.received iS NULL
poj

Replies are listed 'Best First'.
Re^6: output results from sql join
by bigup401 (Pilgrim) on Sep 29, 2018 at 13:09 UTC

    it has worked now, thanks poj and roboticus