add deprecation notice for sql_random_function()

This commit is contained in:
Andrew Dolgov
2025-04-14 15:27:58 +03:00
parent 54e8ab7e3d
commit 3c138a71a1
3 changed files with 3 additions and 4 deletions

View File

@@ -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);