[support] Using two databases

José Salgado jose at ictnet.es
Mon Dec 11 22:27:26 UTC 2006


Hi all.

I'm using two databases in drupal, one for drupal itself and another to
connect with mailman via MySQL.

The issue is, if I use de stander form: db_set_active('mailman'); to
change to the mailman DB doesn't work, seems stiked on the drupal
database.

I'm try to create a function that changes the database, but doesn't work
at all.

So, I have to make the changes using the classic
$dbi = mysql_connect("localhost", "USER", "PASS");
mysql_select_db("mailman", $dbi);

at the bennging of each function and reconect again to drupal using the
same technique.

The issue here I don't like the way I do it and I rather preffer the
"standard" of db_set_active, but doesn't work. What I'm doing wrong?

By the way, I'm using the lastest estable version of Drupal.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada
	digitalmente
Url : http://lists.drupal.org/pipermail/support/attachments/20061211/bad542ac/attachment.pgp 


More information about the support mailing list