Skip to content

Commit 664b0f1

Browse files
committed
Drop ORDER BY RAND()
1 parent 3f71386 commit 664b0f1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

common/src/Module.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ private function getOrdersToInvite($db, $ps_shop_id, $first_order_id) {
248248
OR o.{$this->getPluginColumnName('invite_tries')} IS NULL
249249
)
250250
AND COALESCE(o.{$this->getPluginColumnName('invite_time')}, 0) < $max_time
251-
ORDER BY RAND()
252251
LIMIT 10
253252
");
254253

@@ -261,6 +260,8 @@ private function getOrdersToInvite($db, $ps_shop_id, $first_order_id) {
261260
), 3);
262261
}
263262

263+
shuffle($result);
264+
264265
return $result;
265266
}
266267

0 commit comments

Comments
 (0)