Pernahkah anda ingin mendapatkan info-info fields yang anda terima dari hasil select query MySQL pada PHP? Mungkin inilah jawaban bagi anda.
while ($i < mysql_num_fields($result)) {
//echo "Information for column $i:<br />\n";
$fields = mysql_fetch_field($result, $i);
if (!$fields) {
echo "No information available<br />\n";
}
echo "<pre>
blob: $fields->blob
max_length: $fields->max_length
multiple_key: $fields->multiple_key
name: $fields->name
not_null: $fields->not_null
numeric: $fields->numeric
primary_key: $fields->primary_key
table: $fields->table
type: $fields->type
default: $fields->def
unique_key: $fields->unique_key
unsigned: $fields->unsigned
zerofill: $fields->zerofill
</pre>";
$i++;
}
Semoga bermanfaat
No comments:
Post a Comment