테이블, 스레드가 있습니다. thread_participants 테이블이 있습니다. 특정 thread_id 및 특정 thread_participants.user_id를 식별하는 행을 분리하려고합니다.SQL 쿼리에서 행을 분리하십시오.
예를 들어 thread_id = 5가 thread_participants.user_id = 6과 일치하고 다른 thread_participants와 일치하면 thread_id를 알고 싶습니다.
SELECT tp.thread_id FROM thread_participants tp WHERE tp.user_id = $user_id AND tp.user_id != ANYBODY ELSE
Wonderful, 내가 변경 한 것은 (tp.user_id <$ user_id) to (tp.user_id! = $ user_id)뿐이었습니다. 다른 방법으로 오류가 발생했습니다. – compguy24