Skip to content

Instantly share code, notes, and snippets.

@j1cs
Last active August 29, 2015 14:19
Show Gist options
  • Save j1cs/37d66347038a99f9c18f to your computer and use it in GitHub Desktop.
Save j1cs/37d66347038a99f9c18f to your computer and use it in GitHub Desktop.
repite el proceso a medida que se eliminan tuplas reinicianado el contador
<?php
for ($i = $start; $i < $end; true) {
if ($batch > ($end - $i)) {
$batch = ($end - $i);
}
if ($end !== $companyRepo - > getCountCompanyByAccount($this - > accountId)) {
$end = $companyRepo - > getCountCompanyByAccount($this - > accountId);
$i = 0;
} else {
$i += $batch;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment