foreach ($newArray as $sKeyInd => &$newValue) {$newValue['id'] = $oldArray[$sKeyInd]['id'];unset($newValue);store($updateNulls = false) code in vmtablexarray.php calculated each image's order number but never wrote it to the database. It assigned the number to a copy of the row (foreach (... as $k => $newValue)), so the original row never got it. Every row was stored without an order number.
Page created in 0.094 seconds with 13 queries.