复制代码代码如下:
$link = mysql_connect('localhost', 'username', 'password');
$fields = mysql_list_fields("database", "table", $link);
$columns = mysql_num_fields($fields);
$field = false;
for ($i = 0; $i $field .= "'".mysql_field_name($fields, $i) . "',";
}
print $field;
http://www.bkjia.com/PHPjc/736820.html
www.bkjia.com
true
http://www.bkjia.com/PHPjc/736820.html
TechArticle
复制代码 代码如下: ?php $link = mysql_connect('localhost', 'username', 'password'); $fields = mysql_list_fields("database", "table", $link); $columns = mysql_num_fields($fi...