Vote button code improvements (#1140)

* Vote button code improvements

* Update thanks.php
This commit is contained in:
Roman Kelesidis 2023-11-21 00:29:02 +07:00 committed by GitHub
commit c046e8a8c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 55 additions and 39 deletions

View file

@ -38,7 +38,7 @@ if ($delete_dlstat_sql = implode(') OR (', $delete_dlstat_sql)) {
// Save the last 50 votes for topics
DB()->query('
DELETE t1
FROM' . BB_THX . ' t1
FROM ' . BB_THX . ' t1
JOIN (
SELECT topic_id, MAX(time) as max_time
FROM ' . BB_THX . '