0
Galley is the following need to assign tasks to a variable number of participants. EX: Through a select I got 49 tasks to be executed and I have to distribute to 4 employees. In other words the division would be like this first employee would have 12 tasks the 2nd employee would have 12 tasks the third official would have 12 tasks and the 4th employee would have 13 tasks that would be the rest. Both the number of tasks how many employees come from a select can vary and each task and employee has a unique code. Official 1 task 1 Official 1 task 2 and so until I turn 12 then I would pass to the other with 12 more...
I am using PHP PDO Mysql and need to make a loop that makes this distribution the way I explained but do not know how to do. if any can help me I’ll be very grateful.