Get field length : Table MetaData « MySQL Database « PHP






Get field length


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

   $query = "SELECT FirstName FROM Employee ";
   $result = mysql_query($query);
   $row = mysql_fetch_row($result);
   echo mysql_field_len($result, 0);

?>

           
       








Related examples in the same category

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