sorry - got rid of that error.
was putting $db1, $connection_1 in the mysql_list_tables().
and how does its work when it comes down to;
$result = mysql_list_tables($dbA, $db😎; // ($connectionA, $connection😎
?
and is the below code correct as far as you can tell?
$host = "localhost";
$user = "";
$pass = "";
$dbA = "";
$connectionA = mysql_connect($host, $user, $pass) or die ("Unable to connect!");
mysql_select_db($dbA, $connectionA) or die ("Unable to select database!");
$hostB = "";
$userB = "";
$passB = "";
$dbB = "";
$connectionB = mysql_connect($hostB, $userB, $passB) or die ("Unable to connect!");
mysql_select_db($dbB, $connectionB) or die ("Unable to select database!");
$result = mysql_list_tables($dbA, $dbB);
while ($row = mysql_fetch_row($result)) {
echo "<BR>Table: $row[0]\n";
$resultb = mysql_query("SHOW COLUMNS FROM $row[0]");
if(!$resultb) {
echo 'Could not run query: ' . mysql_error();
exit;
}
if (mysql_num_rows($resultb) > 0) {
while ($row = mysql_fetch_assoc($resultb)) {
print_r($row);
echo "<BR>";
}
}
}
many thanks. D.