How do I find the field with the longest length of a specific column in a MySQL table?
You can use the mysql command LENGTH()
<?php
$q = mysql_query("SELECT LENGTH(yourfield) AS fieldlength FROM yourtable ORDER BY fieldlength DESC LIMIT 1");
echo $longestfield = mysql_result($q,0);
?>