时间:2021-07-01 10:21:17 帮助过:16人阅读
$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 '
';
}
mysql_close($link);