how would i select the field types of a table from php??
for ($i=0; $i < mysql_num_fields($result); $i++) {
$fieldname = mysql_field_name($result, 1);
$type = mysql_fieldtype($result, $i);
$len = mysql_field_len($result, $i);
$flags = mysql_field_flags($result, $i);
echo $fieldname." ".$type." ".$len." ".$flags."<br>";
}
for the field type it returns values like string, int, blob
How do i get the values like varchar and char instead of string???
for ($i=0; $i < mysql_num_fields($result); $i++) {
$fieldname = mysql_field_name($result, 1);
$type = mysql_fieldtype($result, $i);
$len = mysql_field_len($result, $i);
$flags = mysql_field_flags($result, $i);
echo $fieldname." ".$type." ".$len." ".$flags."<br>";
}
for the field type it returns values like string, int, blob
How do i get the values like varchar and char instead of string???