Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于日榜数据更新的问题 #78

Open
ZHFlame opened this issue Jan 28, 2022 · 1 comment
Open

关于日榜数据更新的问题 #78

ZHFlame opened this issue Jan 28, 2022 · 1 comment

Comments

@ZHFlame
Copy link

ZHFlame commented Jan 28, 2022

正常排行榜是刷新纪录之后才会更新,但当以前有一个纪录,你想上今天的日榜必须超过之前的记录才可以。
不知道我表述清不清楚,举个例子:
比如某人昨天打到了180,昨天时在日榜 周榜 月榜的第一。到了今天,日榜一刷新,他在今天打到了179,明明没有人超过他,却不会被显示在日榜上,只有换个名称才可以刷新。
这个能解决下嘛,周榜月榜会不会也出现这种问题

@ZHFlame
Copy link
Author

ZHFlame commented Jan 28, 2022

if ($score > $highest) {
            $update_sql = "UPDATE " . $ranking . " SET `score`=?,`time`=NOW(),`system`=?,`area`=?,`message`=?,`attempts`=? WHERE `name`=?";
            $update_stmt = $link->prepare($update_sql);
            $update_stmt->bind_param('isssis', $score, $system, $area, $message, $attempts, $name);
            $update_stmt->execute();
            $update_stmt->close();
        }

这个地方是比历史最高记录高才会提交,就是说能不能每个榜单独记录什么的,这样即使不比历史记录高也能记录到日榜

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant