时间:2021-07-01 10:21:17 帮助过:3人阅读
$query=$db->query(" SELECT * FROM $tablename limit 1");
$num=mysql_num_fields($query);2、使用show fields
$sqlr="show fields from $tablename";
$query=mysql_query($sqlr);
while($row=mysql_fetch_array($query))
{
print_r($row);
$data[]=$row['Field'];
}
http://www.bkjia.com/PHPjc/742413.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/742413.htmlTechArticle1、使用mysql_fetch_field $query=$db->query(" SELECT * FROM $tablename limit 1"); $num=mysql_num_fields($query); for($i=0;$i { $f_db=mysql_fetch_field($query,$i); $showdb[]=$f_db...