@mysql_connect("localhost","username","password") or die("无法连接数据库"); @mysql_select_db("databasename") or die("未找到数据库"); getConnection(); $query="select definition,accession,gi from birds_nucleotide order by definition limit 0,200"; $result=mysql_query($query); if(!$result){ echo "查询失败"; return false; } for ($count = 0; $count<mysql_num_rows($result); $count++) { //处理... echo mysql_result($result, $count,"definition"); }