<?php header('Content-Type: text/html; charset=utf-8'); $db_host='127.0.0.1'; $db_username='root'; $db_password='suibianba'; $db_database = 'information_schema'; $connection=mysql_connect($db_host,$db_username,$db_password);//连接到数据库 mysql_query("set names 'utf8'");//编码转化 if(!$connection){ die("could not connect to the database:".mysql_error());//诊断连接错误 } $db_selecct=mysql_select_db($db_database);//选择数据库 if(!$db_selecct) { die("could not to the database".mysql_error()); } session_start(); $query="SELECT * FROM `TABLES` WHERE TABLE_SCHEMA='f2b_period' order by TABLE_NAME";//构建查询语句 $result=mysql_query($query);//执行查询 while($result_row=mysql_fetch_array($result)){ ?>
<?php echo $num ?> | <?php echo $row2["COLUMN_NAME"] ?> | <?php echo $row2["COLUMN_TYPE"] ?> | <?php echo $row2["IS_NULLABLE"] ?> | <?php echo $row2["COLUMN_DEFAULT"] ?> | <?php echo $row2["COLUMN_COMMENT"] ?> |