1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
<?php
$connect = mysql_connect("localhost","root","");
$res = mysql_query("SHOW DATABASES");
while ($row = mysql_fetch_array($res)) {
echo "Base de donnée: {$row[0]}<br>";
$sql = 'SELECT table_name FROM information_schema.tables ORDER BY table_name ASC';
$result = mysql_query($sql) or die ('result');
while ($row = mysql_fetch_array($result)) {
echo "Table :{$row[0]}<br>";
$sql2 = 'SELECT column_name FROM information_schema.columns ORDER BY column_name ASC';
$result2 = mysql_query($sql2)or die ('result2');
while ($row2 = mysql_fecth_array($result2)){
echo "Champs :{$row2[0]}<br>";
}
}
}
mysql_close();
?> |
Partager