MySQL查询:
set @row_num = 0; SELECT profile, row_number as rank FROM(SELECT @row_num := @row_num + 1 as row_number, time, profile, map FROM records WHERE map='". $map ."' ORDER BY time) as t WHERE profile='". $profile ."'
错误:
您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以在第 1 行的 'SELECT profile, row_number as rank FROM(SELECT @row_num := @row_num + 1 as row_nu' 附近使用正确的语法