Skip to content

Instantly share code, notes, and snippets.

@kuntashov
Created June 22, 2018 08:19
Show Gist options
  • Select an option

  • Save kuntashov/3bb95b95a2897c1188189a9e93b1c085 to your computer and use it in GitHub Desktop.

Select an option

Save kuntashov/3bb95b95a2897c1188189a9e93b1c085 to your computer and use it in GitHub Desktop.
Удаление отмененных заказов
<?php
CModule::IncludeModule('sale');
$res = $DB->Query("select ID from b_sale_order where CANCELED = 'Y' by id ASC LIMIT 500");
$count = 0;
while ($row = $res->Fetch()) {
CSaleOrder::Delete($row['ID']);
$count += 1;
}
//echo "Deleted $count orders"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment