我有3张桌子,
user { id, name, email }
games { id, name, icon }
user_games {id_user, id_game}
我想选择用户还没有的游戏。
这是我最好的尝试,但什么也没返回。但最后不要给出错误消息XD
SELECT a.*
FROM games a
LEFT JOIN user_games b ON a.id IN (b.id_game) AND '1' IN (b.id_user)
WHERE (b.id_game IS NULL) AND b.id_user <> '1'
请帮忙。