错了,用:
SHOW FIELDS FROM table

解决方案 »

  1.   

    写几行吧,下面把相应的DB名,table名换成你的就可以了<?php
    //include_once("inc/PEAR_inc.php");
    include_once("inc/connDB.php");//打开数据库
    connDB("gunshi");
    $local_query = "SHOW FIELDS FROM news_content";
    $fields_rs   = mysql_query($local_query);
    $fields_cnt  = mysql_num_rows($fields_rs);
    while($row=mysql_fetch_array($fields_rs)){
    echo $row['Field']."<br>";
    }?>