I'm creating a plugin and I need to access an external WordPress database's $wpdb
to find that database's prefix. The connection to the external database is defined in $conn
and the connection works. However, I'm not sure what code to write in order to get the external database's prefix. I was hoping something like this would work:
$db_prefix_conn = $conn->base_prefix;
But that doesn't do anything. Any help is greatly appreciated.
↧
Chris_topher on "accessing $wpdb from a different WordPress database"
↧