私はテーブル「メッセージ」を持っています。
フィールドは次のとおりです。
- id (primary key, int, auto increment)
- uid (the user who sent the message)
- rid (the user who received the message)
- text (text of the message)
- time (time of message)
- read (read or unread. 0 is unread, 1 is read).
ユーザーとして言えば、私は UID または RID のいずれかになります。では、メッセージを送受信したユーザーのリストを表示したい場合は、どうすればよいですか? さらに、各ユーザーは一度だけ表示する必要があります。助けてください。ありがとう。:)