php pdo get database name
snippet in php

php pdo get database name

user7654

$pdo->query('select database()')->fetchColumn();