The mysqli_fetch_field_direct() function returns meta-data for a single field (column) in the result set, as an object.
mysqli_fetch_field_direct(result,fieldnr);
name); printf("Table: %s\n",$fieldinfo->table); printf("max. Len: %d\n",$fieldinfo->max_length); // Free result set mysqli_free_result($result); } mysqli_close($con); ?>