<?php $dbi = new DbMysql; $dbi->dbh = ‘mysql://root:[email protected]/coffeetest‘; $map = array(); $dbi->fetchMap("SHOW TABLES", $map); $tables = array_keys($map); for($i=0; $i<count($tables); $i++){ echo($tables[$i]."\n"); $fields = $dbi->field($tables[$i]); foreach($fields as $item){ echo("\t".$item["Field"]."\t".$item["Key"]."\t".$item["Extra"]."\n"); } } ?>
原文地址:https://www.cnblogs.com/coffee_cn/p/8994328.html
时间: 2024-10-31 13:00:23