同城、本地微信群分享
生活帮帮帮,找工作、求职、租房、租车,享受生活、食材团购、寻味美食

SELECTatypeagroupIdbmsgbmsgTyp…

SELECT
a.type,
a.groupId,
b.msg,
b.msgType,
b.userTel,
b.toUserTel,
b.STATUS,
b.createTime,
c.tel,
c.nickName,
c.headImg,
d.noReadTotal
FROM
temporary_chat_list a,
messages b,
USER c,
( SELECT COUNT( 1 ) AS noReadTotal FROM messages WHERE groupId = a.groupId GROUP BY groupId ) d
WHERE
a.msgId = b.mId
AND (
( b.userTel = 15111327689 AND c.tel = b.toUserTel )
OR ( b.toUserTel = 15111327689 AND c.tel = b.userTel )
)
ORDER BY
b.createTime

赞(0)

相关推荐

评论 电子邮件地址不会被公开。 必填项已用*标注

  • 验证码*
  • 昵称*
  • 邮箱*
  • 网址