I've got a small question. Say within a script, you see a select statement, or a return value somewhere, and you are wanting to know what database and connection that particular query is using.
How would you go about obtaining this? Yes, I understand that the variables are defined elsewhere, but when you are dealing with a spider web of code that is spread out among multiple files, it's kinda hard to track down where this stuff is being defined.
So, I guess I'm just wondering is there a function like "Get Current Database Name in Use", "Get Current Table Name In Use" and/or "Get Current MySQL Connection Information in Use" ? Would be much appreciated if anyone has an answer to this.