Use userid rather than username
This commit is contained in:
parent
fb08a80308
commit
0c6237ed01
|
@ -39,7 +39,7 @@ func getUserX(c *gin.Context, db *sql.DB, orderBy string, limit int) {
|
||||||
scores.pp, scores.accuracy
|
scores.pp, scores.accuracy
|
||||||
FROM scores
|
FROM scores
|
||||||
LEFT JOIN beatmaps ON beatmaps.beatmap_md5 = scores.beatmap_md5
|
LEFT JOIN beatmaps ON beatmaps.beatmap_md5 = scores.beatmap_md5
|
||||||
LEFT JOIN users ON scores.username = users.username
|
LEFT JOIN users ON scores.userid = users.id
|
||||||
WHERE %s AND scores.play_mode = ?
|
WHERE %s AND scores.play_mode = ?
|
||||||
%s
|
%s
|
||||||
LIMIT %d`, whereClause, orderBy, limit,
|
LIMIT %d`, whereClause, orderBy, limit,
|
||||||
|
|
|
@ -53,7 +53,7 @@ SELECT
|
||||||
beatmaps.ranked_status_freezed, beatmaps.latest_update
|
beatmaps.ranked_status_freezed, beatmaps.latest_update
|
||||||
FROM scores
|
FROM scores
|
||||||
LEFT JOIN beatmaps ON beatmaps.beatmap_md5 = scores.beatmap_md5
|
LEFT JOIN beatmaps ON beatmaps.beatmap_md5 = scores.beatmap_md5
|
||||||
LEFT JOIN users ON users.username = scores.username
|
LEFT JOIN users ON users.id = scores.userid
|
||||||
`
|
`
|
||||||
|
|
||||||
// UserScoresBestGET retrieves the best scores of an user, sorted by PP if
|
// UserScoresBestGET retrieves the best scores of an user, sorted by PP if
|
||||||
|
|
Loading…
Reference in New Issue
Block a user