Salve, è giusta secondo voi questa query o c'è qualche errore, a me non funziona. Vorrei estrarre l'ultimo ID di $nome nella tabella ts
$dati=mysql_query("select progressivo from autofx where id =(select MAX(id) from progressivo where nomets='$nomets'");
while($array=mysql_fetch_array($dati))
{
echo "$array[0]";
}