This is a query which whows friends who are online by selecting rows which exist in tables
friends, usertable, session
$result = mysql_query("SELECT
friends.id, friends.nick, usertable.photo
FROM friends use index (owner)
join usertable on friends.friendid = usertable.id
join session on friends.friendid = session.user
WHERE friends.owner='$id' and friends.approved='1'
order by friends.nick limit $start, $step") or die(mysql_error());
But now I need to display friends who are not online (don't exist in table session)
Is it possible to use Join to select rows which exist in tables
friends, usertable
but doesn't exist in table
session ?
Thanks.