类似于ODBC函数库的odbc_result_all函数,调试mysql应用很有用的。function mysql_result_all($result,$format="") {
  echo "<table $format><tr>";
  for($i=0;$i<mysql_num_fields($result);$i++) {
    echo "<th>".mysql_field_name($result,$i)."</th>";
  }
  echo "</tr>";
  while($row = mysql_fetch_row($result)) {
    echo "</tr>";
    for($i=0;$i<mysql_num_fields($result);$i++) {
      echo "<td>".$row[$i]."</td>";
    }
    echo "</tr>";
  }
  echo "</table>";
}  
//例
$conn = mysql_connect();
mysql_select_db("库");
$rs = mysql_query("select * from tbl_name");
mysql_result_all($rs);