Limiting results with a join while not counting joined results?
Posted
by Matt
on Stack Overflow
See other posts from Stack Overflow
or by Matt
Published on 2010-05-25T07:10:30Z
Indexed on
2010/05/25
8:11 UTC
Read the original article
Hit count: 223
Don't know if this is possible, I am looking a writing social network-esque code but need a bit of help.
SELECT wall.Wid, wall.uid, wall.wcomment, wall.name, comment.wid, comment.comment,comment.wid
FROM wall
LEFT JOIN comment ON wall.Wid=comment.wid
WHERE wall.uid in (SELECT fid from friends where uid = 3)
Cheers guys
© Stack Overflow or respective owner