i have a sql statement:
SELECT user.id, user.nickname
FROM friends
LEFT JOIN user ON user.id=friends.desuser where friends.orguser = '".$sessionid."'
it works fine and results are like
12 user1
33 user3
etc
but when in my user DB lets say user1 is deleted, but still there is a record in friends.desuser, I get as result NULL NULL .
What can i do that I minimum would get the UserID like
12 NULL
33 user3
thank you
If you really want to return user IDs like that from friends that have been orphaned,
instead of
since the id will not exist in
user(since there’s no matching record inuser)