By drecute on
I'm on Drupal 6 and I will like to know if there's any API function to get the database name for a Drupal installation.
I'm trying to avoid running a query like this:
db_query("SELECT count(*) FROM information_schema WHERE table_schema = '%s' and table_name = '%s'", $schema, $table);
Thanks
Comments
You can get database url,
You can get database url, from that url you can find database name easily
Best
Kuldev