Hi guys.
I'm hoping you can help me out please.
We have a private messaging system which allows user->user communication, and also for a "Group" message to be sent to a whole group and all its members.
There's one annoying thing though, at present, only one recipient can be selected, or one group.
We want to update the attached code to allow for up to 5 recipients (in the "send" case) and up to 3 groups (in the "group case") to be sent.
I've tried doing this myself, but I'm getting really confused on how to do it.
As you will see with the code, the user->user communication ("send" case) checks that the sender hasn't sent too many messages in a certain time, and that the recipent's inbox isn't full.
I was wondering if anyone could help me updating the below code to work with sending to more than one recipient and group but to still apply the same checks? One other thing I cannot figure out is how to check that the same recipient on the "send" case isn't listed twice - so they don't receive the same message twice. This is already done with the "group" case with SELECT DISTINCT
Also, for the Group message, it states in the message which group it was sent to - I was hoping it could state all the groups.
I'm hoping this makes sense I've tried to scale it down so just the basics are there - hope that helps.
Thanks in advance.