我有一个表“消息”。
字段是:
- 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。因此,如果我想显示我发送/接收消息的用户列表,我该怎么做?另外,每个用户应该只显示一次。请帮忙。谢谢。:)