mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge pull request #8215 from furo321/fix-timecp-mysql
Fix `/timecp` not working with MySQL
This commit is contained in:
commit
47e4505193
|
@ -220,11 +220,11 @@ bool CScoreWorker::LoadPlayerTimeCp(IDbConnection *pSqlServer, const ISqlData *p
|
|||
str_format(aBuf, sizeof(aBuf),
|
||||
"SELECT"
|
||||
" Time, cp1, cp2, cp3, cp4, cp5, cp6, cp7, cp8, cp9, cp10, cp11, cp12, cp13, "
|
||||
" cp14, cp15, cp16, cp17, cp18, cp19, cp20, cp21, cp22, cp23, cp24, cp25, "
|
||||
" (cp1 + cp2 + cp3 + cp4 + cp5 + cp6 + cp7 + cp8 + cp9 + cp10 + cp11 + cp12 + cp13 + cp14 + "
|
||||
" cp15 + cp16 + cp17 + cp18 + cp19 + cp20 + cp21 + cp22 + cp23 + cp24 + cp25 > 0) AS hasCP "
|
||||
" cp14, cp15, cp16, cp17, cp18, cp19, cp20, cp21, cp22, cp23, cp24, cp25 "
|
||||
"FROM %s_race "
|
||||
"WHERE Map = ? AND Name = ? AND hasCP = true "
|
||||
"WHERE Map = ? AND Name = ? AND "
|
||||
" (cp1 + cp2 + cp3 + cp4 + cp5 + cp6 + cp7 + cp8 + cp9 + cp10 + cp11 + cp12 + cp13 + cp14 + "
|
||||
" cp15 + cp16 + cp17 + cp18 + cp19 + cp20 + cp21 + cp22 + cp23 + cp24 + cp25) > 0 "
|
||||
"ORDER BY Time ASC "
|
||||
"LIMIT 1",
|
||||
pSqlServer->GetPrefix());
|
||||
|
|
Loading…
Reference in a new issue