ciao, se ho capito bene

Codice PHP:
$query=mysql_query("SELECT id FROM tabella WHERE condizione");
for (
$i=0$i<mysql_num_rows($query); $i++) { echo "input"; } 
fa un ECHO per ogni risultato che fa la query ($QUERY)

Andrea