Tolik rozruchujen v LopuchuLopuch.cz
SELECT @poradi := @poradi + 1 AS poradi, jmeno, pocet FROM (SELECT @poradi := 0) p, body ORDER BY 1;
SELECT (select count(*) from body b where b.pocet > body.pocet) + 1 AS poradi, jmeno, pocet FROM body ORDER BY 1;
select a.zavodnik, (select count(*) from tabulka b) - (select count(*) from tabulka c where c.body<a.body) poradi from tabulka a order by 1 desc
while ($mod <= $pagesize) {
$output .= '<td></td>';
$mod++;
if ($mod%3 == 0) $output .= '</tr><tr>';
}