If I have a table in a MySQL DB, with fields id and position amung others.
Then in PHP I have an array like this:
Array
(
[0] => 1
[1] => 3
[2] => 8
[3] => 4
[4] => 5
[5] => 6
[6] => 7
)
Where the array key should map to the position and the array value should map to the id.
For example, If I made a call for every array value the first would be
UPDATE table SET position = 0 WHERE id = 1
Is there a way I could do all this in 1 call?