[support] Using two databases

Chris Johnson cxjohnson at gmail.com
Tue Dec 12 11:39:13 UTC 2006


One shouldn't even have to mess with $db_url .  I have a bunch of modules
which use db_set_active() successfully in Drupal 4.7 and none touch
$db_url.  Most of my code looks something like this:

$previousdb = db_set_active('mydb');
$result = pager_query($sql, $limit, 0, NULL);
// handle results
db_set_active($previousdb);

Morbus, are you finding that your code doesn't function correctly without
tweaking the global $db_url?  Seems like something might be broken, if so.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20061212/ebef8461/attachment.htm 


More information about the support mailing list