Total number of fields in a table
<?php
mysql_connect("mysql153.secureserver.net","java2s","password");
mysql_select_db("java2s");// databasename
$fields = mysql_list_fields("java2s","Employee");// databasename and tablename
echo "Total number of fields returned: ".mysql_num_fields($fields).".<br />";
?>
Related examples in the same category