<?php
//Si vogliono leggere tutti i database e
//le tabelle disponibili per l'utente di nome pippo:
$id = mysql_connect("localhost","pippo","pippo");
$res = mysql_list_dbs($id);
$conta_t=0;
$conta_d=0;
while ($db = mysql_fetch_row($res))
{
echo "DATABASE: ".$db[$conta_d]."<BR><HR>";
$res2 = mysql_list_tables($db[0]);
while ($tb = mysql_fetch_row($res2))
{
echo "TABELLA: ".$tb[$conta_t]."<BR>";
}
$conta_d = $conta_d + 1;
$conta_t = 0;
}
?>
Letture database per un nome utente
Si leggono tutti i database e le tabelle disponibili per l'utente di nome pippo.