From 409b734d3a2326c2d5b0de6315a04e3d3a2697f9 Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Sat, 20 Sep 2025 19:41:29 +0700 Subject: [PATCH] torrents.php list sql debug --- public/torrents.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/torrents.php b/public/torrents.php index e8c3f299..f29739be 100644 --- a/public/torrents.php +++ b/public/torrents.php @@ -1002,9 +1002,11 @@ if ($count) // $query = "SELECT $fieldsStr, categories.mode as search_box_id FROM torrents ".($search_area == 3 || $column == "owner" ? "LEFT JOIN users ON torrents.owner = users.id " : "")." LEFT JOIN categories ON torrents.category=categories.id $tagFilter $where $orderby $limit"; $query = "SELECT $fieldsStr, $sectiontype as search_box_id FROM torrents ".($search_area == 3 || $column == "owner" ? "LEFT JOIN users ON torrents.owner = users.id " : "")."$tagFilter $torrentExtraFilter $where $orderby $limit"; // } - do_log("[TORRENT_LIST_SQL] $query", 'debug'); + if (!$shouldUseMeili) { + do_log("[BEFORE_TORRENT_LIST_SQL]", 'debug'); $res = sql_query($query); + do_log("[AFTER_TORRENT_LIST_SQL] $query", 'debug'); } } else { unset($res);