Theres no real way to “join” tables like that, at least not using the standard WordPress functions.
The big question is… does DBB in your example have all of the data for the site, or is there different data in both DB’s?
If DBB holds everything, then just switch over to using that database, and forget about DBA.
If DBB and DBA are different, you’d have to look at exactly which tables contain different data. If you’re trying to move things like posts or pages across, thats possible, but you’d need to do a bit of work in the export and import process to make sure that all of the ID’s are consistent when you copy everything from the meta tables as well.
catacaustic – thanks for replying. I apologize in advance for the upcoming long story, but it explains a lot.
I made a website for a guy who, after delivery, managed to mess up the website with lots of help from his half-rate hosting site. He gave it back to me, and in my research I discovered that the database I gave him, DBA, had data removed from three tables crucial to the operation of a plugin. (The tables are there, but not the data.) Fortunately for him, I have a backup of his database (DBB). I need to get the data from the three tables in DBB to DBA. DBA has tables that DBB does not have, so switching databases is not an option. The thought of having to manually enter all of that data into DBA (bleeps) me off. That’s why I thought of using a join. It’s been a while since I’ve worked with SQL. Is there any way, short of sitting and typing for hours that I can transfer this data?
If it’s three tables only that have been removed you can safely create an SQL dump from the “correct” database and import them into the other database. Any DB management tool will be able to do that, with the most common being phpMyAdmin.
catacaustic – you are indeed very awesome! Your solution worked perfectly. Thanks for helping me, I really appreciate it!