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 ""; } ?>