I need to write a code that finds the name of the current sql database and puts that name in a variable. I'll take any suggestions, but what I was thinking was querying the current database name and putting that in a variable. I don't know if that will work because I can't seem to query my database name at all. The database I'm using for this is named "wp_plugin_development" but the query won't show me that. I'm using the code:
SELECT DB_NAME() AS [Current Database];
to get the database name in phpMyAdmin, but it brings up an error saying:
1305 - FUNCTION wp_plugin_development.DB_NAME does not exist
I don't know why it's doing that. Thanks for any help.