Closed (fixed)
Project:
phpBB Forum Integration
Version:
6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Mar 2008 at 01:12 UTC
Updated:
9 Jan 2012 at 08:44 UTC
Hi All,
I have multiple phpbb3 forums (and therefore multiple separate databases of users). Would it be possible to use the phpBBforum module to interact with my multiple databases at once? Right now, the module allows me to input the address of only one database. If this feature already does exist, how do I implement it? Thanks!
-Boston
Comments
Comment #1
vb commentedthis feature does not exist
Comment #2
snailian commentedI haven't switched to 6.x, so I can only comment on what I've learned with 5.x.
I'm also unfamiliar with the phpBBforum module, but I do know how to work with multiple databases.
You can easily setup drupal to use connect to multiple databases. If you take a look in sites/sitename/settings.php you'll see a commented section around line #88 showing you how to do so. You would have to setup a $db_url line for each DB that you'd like to connect to. Depending on what it is that you'd like to do, you could create a function to cycle through the databases and run whatever query you'd need to on each one until the query returns a result. This would be expensive (resource-wise) and I wouldn't recommend having it run often, but it's possible. I do believe (I can be wrong, I'm still new to this) that the only limitation is that each database must be of the same type. In other words, you can't mix MySQL and pgsql databases.
Here is an example of how you would want to setup the database entries:
$db_url[default] = 'mysql://username:password@localhost/databasename';
$db_url[database2] = 'mysql://username:password@localhost/databasename';
$db_url[database3] = 'mysql://username:password@localhost/databasename';
$db_prefix = '';
Good luck!
Comment #3
fizk commented