ho trovato la soluzione 5 secondi dopo

Codice PHP:
$numero 1; while ($row mysql_fetch_array($result) AND $numero <= $tot_records