Make params inclusive.

This commit is contained in:
Vedanshu Jain 2023-03-28 18:38:59 +05:30
parent 4245ec17b9
commit 99e4ed4963
1 changed files with 2 additions and 2 deletions

View File

@ -346,7 +346,7 @@ class CLIRunner {
$order_ids = $wpdb->get_col(
$wpdb->prepare(
"SELECT ID FROM $wpdb->posts WHERE post_type = 'shop_order' AND ID > %d AND ID < %d ORDER BY ID ASC LIMIT %d",
"SELECT ID FROM $wpdb->posts WHERE post_type = 'shop_order' AND ID >= %d AND ID <= %d ORDER BY ID ASC LIMIT %d",
$order_id_start,
$order_id_end,
$batch_size
@ -444,7 +444,7 @@ class CLIRunner {
$order_count = (int) $wpdb->get_var(
$wpdb->prepare(
"SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'shop_order' AND ID > %d AND ID < %d",
"SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'shop_order' AND ID >= %d AND ID <= %d",
$order_id_start,
$order_id_end
)