From 3c138a71a1749537680a23aca6d4181b5b2820f0 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 14 Apr 2025 15:27:58 +0300 Subject: add deprecation notice for sql_random_function() --- classes/RPC.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'classes/RPC.php') diff --git a/classes/RPC.php b/classes/RPC.php index bad51e4aa..031bef509 100644 --- a/classes/RPC.php +++ b/classes/RPC.php @@ -269,8 +269,6 @@ class RPC extends Handler_Protected { $updstart_thresh_qpart = 'AND (last_update_started IS NULL OR ' . Db::past_comparison_qpart('last_update_started', '<', 5, 'minute') . ')'; - $random_qpart = Db::sql_random_function(); - $pdo = Db::pdo(); // we could be invoked from public.php with no active session @@ -290,7 +288,7 @@ class RPC extends Handler_Protected { $owner_check_qpart $update_limit_qpart $updstart_thresh_qpart - ORDER BY $random_qpart LIMIT 30"; + ORDER BY RANDOM() LIMIT 30"; $res = $pdo->query($query); -- cgit v1.2.3-54-g00ecf