Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dbos1504's avatar

Method for equally distribution

Hello, I need a method for: lets say i have 100rows of one table and 3 differente tables, i need to equally distribute these 100 rown to these tables (first table 33, second 33 and third well 34), maybe there is 155 rows then (table one 51, table two 51 and table three 53) , these 100rows will be increasing dinamically, main goal is to distribute them equally to these new tables on a click of a button.... And second scenario: 100rows: 45 has id of 1( not the id but some id of pivot table) 30 has id of 2 25 has id of 3 (all in one table) how to equally (as possible) distribute ids aka. 33 has id 1 33 has id 2 34 has id 3

thanks

0 likes
0 replies

Please or to participate in this conversation.