$result=mssql_query("select Max(Id_radar) from Sintesis_Radar"); while ($row=mssql_fetch_array($result)) { $id_ra=$row["Id_radar"]; echo $id_ra; } :(