Get column data type : Table MetaData « MySQL Database « PHP






Get column data type


<?php
   mysql_connect("mysql153.secureserver.net","java2s","password");
   mysql_select_db("java2s");

   $query = "SELECT id as Employee_ID FROM Employee";
   $result = mysql_query($query);
   $row = mysql_fetch_row($result);
   echo mysql_field_type($result, 0);

?>

           
       








Related examples in the same category

1.Get table column flag
2.Get column name, type and max length
3.Get field length
4.Total number of fields in a table