Posted in PHP onMarch 03, 2014
<?php $link = mysql_connect('localhost', 'username', 'password'); $fields = mysql_list_fields("database", "table", $link); $columns = mysql_num_fields($fields); $field = false; for ($i = 0; $i < $columns; $i++) { $field .= "'".mysql_field_name($fields, $i) . "',"; } print $field;
php获取字段名示例分享
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@