Ask a BBS short message to send a group of SQL statements. The above is the DISCUZ short message group data table. how can I query short messages that the user has not read?
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
Sorry, I cannot clearly describe the problem,
I mean, to query short messages that each user has not read,
That is, user a no longer displays the data after reading the data, but if user B does not read the data, the data is displayed.
I don't know how your data is processed step by step. we recommend that you paste the test data and expected results and briefly describe the logical relationship.
Selece uid pre_common_member_grouppm where status = 0
All users who want to read short messages
It is up to you to decide how to do this in the future.