On 12/12/06, Morbus Iff morbus@disobey.com wrote:
In the above code, where are you specifying the connection details for the new (second) database?
In my settings.php file, like this:
$db_url['default'] = 'mysql://user:password@server/drupal'; $db_url['alt_db1'] = 'mysql://user:password@host1/database1'; $db_url['alt_db2'] = 'mysql://user:password@host2/database2';
The db_set_active() function seems smart enough to choose from the array, and the core DB layer seems smart enough to make the connection on the first query. IIRC. :-/
Am I missing something? My code works, but I wrote it a long time ago and haven't looked at it since.