accessing $wpdb from a different WordPress database
-
I’m creating a plugin and I need to access an external WordPress database’s
$wpdbto find that database’s prefix. The connection to the external database is defined in$connand 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.
The topic ‘accessing $wpdb from a different WordPress database’ is closed to new replies.