I am dealing with a (PHP5) class that uses a MySQL resource (public $_conn). When I do print_r($this->-conn), I get a text such as Resource id #30.
Is it possible to get the connection details for that particular resource? I have to get at least the MySQL username?
You should have the username somewhere in your files, so you can create the connection resource. But you can obtain the current user with the following SQL command:
The PHP Code for this: