Сообщество IT-специалистов
Ответы на любые вопросы об IT
Профессиональное развитие в IT
Удаленная работа для IT-специалистов
select count (*) from sometable where `art` > (select `art` from sometable where `login` = '$login' )
SET @rank=0; SELECT u.* FROM ( SELECT @rank:=@rank+1 AS rank, id, art, login FROM users ORDER BY art DESC ) u where u.login = 'Boris';
SET @row_number:=0; SELECT @row_number:=@row_number+1 AS row_number,db_names FROM mysql_testing ORDER BY db_names;
SELECT @row_number:=@row_number+1 AS row_number,db_names FROM mysql_testing, (SELECT @row_number:=0) AS t ORDER BY db_names;