Reputation: 1
I have multiple drupal sites running off one MySQL database each using a different $db_prefix.
If I was using different databases I could share data by putting them in an array in settings.php and then calling specific databases as I need them.
Is it possible to this by calling a different $db_prefix?
Upvotes: 0
Views: 436
Reputation: 37968
You can share individual tables across different sites, you can do this by making db_prefix an array like this;
$db_prefix = array(
'default' => 'site_a_',
'users_roles' => 'site_b_',
'role' => 'site_b_',
'sessions' => 'site_b_',
'users' => 'site_b_'
);
If this was in the settings.php for site A, then it would share it's user_roles, roles, sessions and users tables with site B.
Is this what you're wanting?
Upvotes: 2