Php generates mysql Data Dictionary and phpmysql dictionary
It is necessary to generate a data dictionary from the mysql database to facilitate viewing database tables and fields. You only need to modify the configuration below to use it, the style is also quite good.
<? Php header ('content-type: text/html; charset = UTF-8 '); define ('db _ host', 'localhost'); define ('db _ user ', 'root'); define ('db _ pass', 'root'); define ('db _ name', 'test'); define ('db _ port ', 3306); define ('db _ CHAR ', 'utf8'); define ('appname', ''); $ conn = mysql_connect (DB_HOST. ':'. DB_PORT, DB_USER, DB_PASS); mysql_select_db (DB_NAME); mysql_query ('set names '. DB_CHAR); $ SQL = "SHOW TABLE STATUS FROM ". DB_NAME; $ resu Lt = mysql_query ($ SQL); $ array = array (); while ($ rows = mysql_fetch_assoc ($ result) {$ array [] = $ rows ;} // table count $ tab_count = count ($ array); echo '<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.