$rs = mysql_query('select content from table1 order by id desc limit 1'); $row = mysql_fetch_array($rs); if(empty($row)) $_a = '暂无'; else $_a = $row['content']; mysql_free_result($rs); mysql_close($db); ?>
或 ;“select max(id) from tablename”
http://zhidao.baidu.com/question/152806434