Interface I have the following parameters obtained from an interface that I create.
data_id=1,2,3,4,....,53
agente_id= 123,234
cantidad= 4
I want to update the rows according to the quantity and agente_id
.
For example:
Of the values of data_id
you would only use 4 ( data_id=1,2,3,4
) and these would be distributed homogeneously to each agent (2 to each).
So the resulting action would be something like this:
UPDATE table_name SET agente_id=123 WHERE data_id=1
UPDATE table_name SET agente_id=123 WHERE data_id=2
UPDATE table_name SET agente_id=234 WHERE data_id=3
UPDATE table_name SET agente_id=234 WHERE data_id=4
I'm using php and ajax
Thank you, I hope you can give me a hand: (