Question

the question is related to wordpress coding only. If it possible, the code solution is able to use inside a wordpress blog.

$wpdb is only work with database that been declare in wp-config. So it possible to clone $wpdb then use the clone to access different database?

Was it helpful?

Solution

You can just create a new instance:

$db2 = new wpdb('root','root','test','localhost');
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow