enter image description here
How to count notifications with a certain status and a certain user_id ?
I have some data in notification table, how is the logic to calculate notification whose status is field 3 based on user_id 2 ?
I want to issue a total of 3 notifications with a status field of 3 in user_id 2
2
Answers
You are searching for the group by function.
For all users and statuses:
According to what you asked, the where condition is status field 3 based on user_id 2.
So you can do in this way
Please show us your effort next time. Thank you