I do not know how to explain, but I will try. I have a table "users", it contains all the information about users, there is a table "pm" - messages, how to make it so that when sending a message it goes to everyone at once? (When sending I use:
INSERT INTO pm (to,author,time,title,content) VALUES ($to,$author,$sendtime,$title,$message); For example, it is not convenient for me to crawl into the code every time and change the number of users ... Can you help? I want to send messages to all users by clicking on the "send" button, that is, one message was repeated several times ( depending on the number of users ) and changed only by the recipient. Example:
INSERT INTO pm (to,author,time,title,content) VALUES ('92','1','21:18','title','message'); and, if the 92nd user is not the last, then the message is sent to 93, 94, and so on ...
Most likely I explained it incomprehensibly, but I can’t do it differently: (Preferably ready code :)