$database ="vplex2022"; $user = "root"; $password = "VP9reen#*"; $host = "mysql"; $connection = new PDO("mysql:host={$host};dbname={$database};charset=utf8", $user, $password); $query = $connection->query("SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_TYPE='BASE TABLE'"); $tables = $query->fetchAll(PDO::FETCH_COLUMN); if (empty($tables)) { // echo "
There are no tables in database \"{$database}\".
"; } else { //echo "Database \"{$database}\" has the following tables:
"; // echo "