I am trying to figure out how I can have two WordPress installations on same database with different prefixes ( wp_ and wp2_ ) and I need them to interact with each other.
For example I have a Blog on one site and a Directory on another site using same database with two wordpress tables (wp and wp2).
How can i pull the classified listings into the blog site.
like the latest directory listings and etc.
Reading through the source code for the
wpdb
class, I see no reason why something like this shouldn’t work:And then (if I’m understanding this right) you can use all the existing
$wpdb
methods and variables. Eg:(If I’m wrong — or if this is bad practice for reasons I haven’t considered — please feel free to correct me.)