$uzkl = mysql_query("SELECT * FROM lenta WHERE id='$id' ORDER BY points DESC"); $n = 0; while ($q = mysql_fetch_array($uzkl)) { $n++; $idas = $q['id']; if($idas == "$id") { echo "<b>$n</b><b>vt</b>."; } }