SeMa™ Posted February 11, 2015 Report Share Posted February 11, 2015 Hola, pues... eso yo por aquí... no se me ocurre la forma de hacer una query y obtener tu numero del ranking ( dando el nombre del pj ) Y no quiero comerme la cabeza así que... si ustedes quereis, adelante. Un saludo. Link to comment Share on other sites More sharing options...
pepineitor Posted February 11, 2015 Report Share Posted February 11, 2015 Si dices en que lenguaje por lo menos. Link to comment Share on other sites More sharing options...
SeMa™ Posted February 11, 2015 Author Report Share Posted February 11, 2015 quiero hacerlo en php, pero solo necesito la query ( mysql ) Link to comment Share on other sites More sharing options...
pepineitor Posted February 11, 2015 Report Share Posted February 11, 2015 SELECT id, name, level, rangFROM(SELECT id, name, level, @num := @num +1 AS rangFROM(SELECT player.id, player.name, player.level, @num :=0FROM player.playerLEFT JOIN player.player_index ON player_index.id = player.account_idINNER JOIN account.account ON account.id=player.account_idWHERE player.name NOT LIKE '[%]%' AND account.status!='BLOCK'ORDER BY player.level DESC) AS t1) AS t2WHERE name LIKE '$VAR_NAME_EN_TU_FORMULARIO' LIMIT 1; SeMa™ and metin2essential 2 Link to comment Share on other sites More sharing options...
SeMa™ Posted February 11, 2015 Author Report Share Posted February 11, 2015 SELECT id, name, level, rang FROM (SELECT id, name, level, @num := @num +1 AS rang FROM (SELECT player.id, player.name, player.level, @num :=0 FROM player.player LEFT JOIN player.player_index ON player_index.id = player.account_id INNER JOIN account.account ON account.id=player.account_id WHERE player.name NOT LIKE '[%]%' AND account.status!='BLOCK' ORDER BY player.level DESC ) AS t1 ) AS t2 WHERE name LIKE '$VAR_NAME_EN_TU_FORMULARIO' LIMIT 1; Gracias Link to comment Share on other sites More sharing options...
Guest DreamHQ Posted February 11, 2015 Report Share Posted February 11, 2015 Tema resuelto. Cierro. Link to comment Share on other sites More sharing options...
Recommended Posts