日期:2014-05-17 浏览次数:20533 次
$link = mysql_connect("localhost", "root", "pwd") or die("Could not connect: " . mysql_error());
mysql_select_db("dbName", $link);
$result = mysql_query("show fields from tableName") or die("Could not query:" . mysql_error());
while($re = mysql_fetch_array($result)){
echo $re[0];
echo '<br />';
}
mysql_close($link);