MySQL: show current database

$result = mysql_query("SELECT database() databaseName");
$row    = mysql_fetch_assoc($result);
var_dump($row);

Leave a Reply