Home >Backend Development >PHP Tutorial >apache php mysql php generates mysql data dictionary
Generate a data dictionary from the mysql database, which can be used directly to view database tables and fields. It is necessary to make a data dictionary. You only need to simply change the configuration below to use it. The style is also very good.
<meta http-equiv="Content-Type" c> <title>'.APPNAME.'--数据字典</title> <style type="text/css"> table caption, table th, table td { padding: 0.1em 0.5em 0.1em 0.5em; margin: 0.1em; vertical-align: top; } th { font-weight: bold; color: black; background: #D3DCE3; } table tr.odd th, .odd { background: #E5E5E5; } table tr.even th, .even { background: #f3f3f3; } .db_table{ border-top:1px solid #333; } .title{font-weight:bold;} </style> <div> <b>'.APPNAME.'--数据字典</b> </div> <div>(注:共'.$tab_count.'张表,按ctrl+F查找关键字)</div>'."\n"; for($i=0;$i'."\n"; echo '
字段 | 类型 | 为空 | 额外 | 默认 | 整理 | 备注 | ' . $tab_array[$j]['Field'] . ' | '."\n"; echo '' . $tab_array[$j]['Type'] . ' | '."\n"; echo '' . ($key_value!=''?$key_value:$tab_array[$j]['Null']) . ' | '."\n"; echo '' . $tab_array[$j]['Extra'] . ' | '."\n"; echo '' . $tab_array[$j]['Default'] . ' | '."\n"; echo '' . $tab_array[$j]['Collation'] . ' | '."\n"; echo '' . ($key_value!=''?$key_name:$tab_array[$j]['Comment']) . ' | '."\n"; echo ' '."\n"; } echo '
---|
The above is the entire content of this article. I hope it will be helpful to everyone’s study, and I also hope everyone will support this site.
The above introduces the data dictionary generated by apache php mysql php for mysql, including the content of apache php mysql. I hope it will be helpful to friends who are interested in PHP tutorials.