$sql = "select max(id) as maxid from download";$lastid = mysql_query($sql,$link);if($lastid){ $result = mysql_fetch_array($lastid);}echo "最后的文件ID是这个:".$result['maxid'];