Ask a forum for short message mass SQL statements.

Source: Internet
Author: User
Above is Discuz's short message mass data table, how to query the user did not read the short message it?


Reply to discussion (solution)

SELECT * From user record table A INNER JOIN message table B on a.gpmid=b.id where a.status=0

SELECT * From user record table A INNER JOIN message table B on a.gpmid=b.id where a.status=0

I'm sorry, but I don't know the description.
I mean, query for short messages that are not read by each user,
That is, a user does not show up after reading, but if B user does not read it will be displayed.

I do not know how your data is step, it is recommended to post test data and expected results, and briefly describe the logical relationship.

Selece uid pre_common_member_grouppm where status=0
Will get all the users who read the short message
As to how to do in the future, it is up to you to decide, I can not agents

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.