I'm working on a project where I have 2 Drupal installations which occasionally need to interact with eachothers database.
So far, I've been able to set up all interactions using db_set_active and db_select/db_query/db_update statements (example below):
db_set_active(.....); db_select(.....); db_set_active;
Simple select queries don't pose any problem. And while update queries are being propagated correctly, they have an inherit issue: they don't call the save hooks in the target Drupal installation...
My use case: I'm database updating a boolean CCK field (in Drupal B) from 0 to 1 (through a module script at Drupal A) and Rules (at Drupal B) should trigger on this. Moreover, the field caches aren't cleared so probably going directly through the database isn't a very good way to update the field...
Any other ideas how to update fields from within external scripts? Or maybe how to execute Rules while keeping the database operations?