Quote:
Originally Posted by kochifish
Ok this one is fixed, i change the database ddriver to another, then i update the SQL query in plugin source, because sqlite and mysql have some difference, but now i only have one problem with this one query:
PHP Code:
case DBA_LOAD: { Format(query, sizeof(query), "SELECT * FROM (SELECT RANK() OVER (ORDER BY t.Score DESC, t.CreatedDate DESC) AS `globalRank` FROM (SELECT * from l4d2_srs.srs GROUP BY steamId) AS t) AS `rt` WHERE rt.globalRank = '%s'", steamId); g_db.Query(OnSelectRow, query, client); }
Could you please help me to convert that query syntax to mysql 8 syntax? i tried but no success, im not an expert with sql. Thank you!
|
I don't set up a mysql server to test,
but it should be just like that
Code:
SELECT *
FROM (
SELECT RANK() OVER(ORDER BY t.score DESC, t.CreatedDate DESC) AS globalRank, *
FROM (SELECT * FROM l4d2_srs.srs GROUP BY steamId) l4d2_srs.srs AS t) AS rt
WHERE rt.steamId = '%s')
You may need to remove 'AS' keyword which I have highlighted.
__________________