$conn = mysql_connect('127.0.0.1','root','123456');mysql_select_db("数据库名称",$conn);$result = mysql_query("SELECT 字段名 FROM 表");while($rs=mysql_fetch_assoc($result)){echo $rs['字段名'],'';}
select id(字段名) from table(表)