Afficher les bases de données de la connexion ouverte

Author:


Download


<html>
<head>
<title>Lister le Schéma</title>
</head>
<body>
<?php

$connexion =  mysql_connect("localhost", "root", "" );
if ( ! $connexion )
    die( "La connexion a echouée" );

$list_BD = mysql_list_dbs( $connexion );
$nombre_BD = mysql_num_rows( $list_BD );

for( $x = 0; $x < $nombre_BD; $x++ )
    echo "<strong/>".mysql_tablename( $list_BD, $x )."<br>";

mysql_close( $connexion );
 ?>
</body>
</html>

Leave a Reply

Your email address will not be published. Required fields are marked *


+ 1 = ten