Quantcast
Channel: Topic Tag: MySQL | WordPress.org
Viewing all articles
Browse latest Browse all 5527

Chris_topher on "accessing $wpdb from a different WordPress database"

$
0
0

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.


Viewing all articles
Browse latest Browse all 5527

Trending Articles