wpdb confusion

Hey guys,

Multi-db issues seem to all be fine now. I do have one remaining issue I'm hoping you can help with.

I am using a 3rd-party (non-wpmudev) plugin for batch cloning sites. There seems to be an issue with a particular query via wpdb, and I can't figure out if its a permissions thing or something that can't be achieved in a multi-db set-up. The particular line is:

$template_tables = $wpdb->get_results( "SHOW TABLES LIKE '$temp_like%'", ARRAY_N );

The $temp_like in this case refers to the tables to be cloned. I get 0 results.

I thought that maybe using switch_to_blog before making the call would solve it. No luck.

In doing some digging I did find that 0 results would be returned if in fact there were no permissions to perform the query, however I suspect it could be a question of wpdb not having information about which DB I would like to SHOW TABLES for. With that in mind, I also tried SHOW TABLES FROM 'the_db' LIKE 'the_prefix'... to no avail.

Any insight you can give would be appreciated.

Thanks!