【问题标题】:How to sort the sender's names in inbox?如何对收件箱中的发件人姓名进行排序?
【发布时间】:2018-04-19 03:27:01
【问题描述】:

我想按发件人姓名对收件箱进行排序。

我使用以下 MySQL 查询进行排序:

SELECT * 
FROM (
  SELECT * 
  FROM Msg_Tab 
  ORDER BY uid DESC
) AS searchmsg 
GROUP BY sender;

但是,如果我发送任何消息,这里不会排序。 它只是在我接收消息时进行排序。

MySQL 表Msg_Tab

senderreceivertimemessage

【问题讨论】:

  • SELECT * FROM (SELECT * FROM Msg_Tab ORDER BY uid DESC) as searchmsg group by sender;

标签: message whatsapp inbox columnsorting


【解决方案1】:

您必须按sender 排序。

SELECT * 
FROM (
  SELECT * 
  FROM Msg_Tab 
  ORDER BY uid DESC
) AS searchmsg 
GROUP BY sender
ORDER BY sender;

【讨论】:

    猜你喜欢
    • 2016-05-22
    • 1970-01-01
    • 2020-11-03
    • 2019-07-26
    • 2011-11-11
    • 1970-01-01
    • 2019-02-23
    • 2017-04-12
    • 1970-01-01
    相关资源
    最近更新 更多