Fixed SQL query for frontend player page