Hi!

That's the problem: i have several drupal(7) tables, installed in db1, that need to be shared to other drupal(7) in db2, but i don't want to add each table in settings.php, i want to make it by prefix.

For example my tables looks like:

db1.drupal_mymodule_table1
db1.drupal_mymodule_table2
db1.drupal_mymodule_table3
etc.

I can share it by this way:

//for db2
'prefix' => array(
 'mymodule_table1'=>'db1_drupal_',
 'mymodule_table2'=>'db1_drupal_',
 'mymodule_table3'=>'db1_drupal_',
 //etc
),

But, i want to share it somehow by prefix, in one line, like this:

//for db2
'prefix' => array(
 'mymodule_*'=>'db1_drupal_'
),

Is there any way to make it?

Thanks!
Dim

Comments

onejam’s picture

Did you follow this tutorial: https://www.drupal.org/node/22267

-----------------------------------------------------------------
We build engaging websites and intuitive designs that will benefit your business.
Duvien

ancient’s picture

Yes, there is nothing about it.
I'm beginning to suspect it's impossible

onejam’s picture

Nothing? i thought under the heading 'Setting $db_prefix to share tables' is all you needed to know.

Either way, i would seriously not consider sharing DB tables. It is messy...

I don't know what you are trying to achieve with this setup but have you looked into: https://www.drupal.org/project/data

-----------------------------------------------------------------
We build engaging websites and intuitive designs that will benefit your business.
Duvien

ancient’s picture

No, there is no information how to share several source tables by one prefix pattern.
I suppose you just don't understand what this topic is about ;)

leemingdental’s picture

Hello Friends,

We are a dental studios borehamwood, London. Looking for a expert guy who is guru in Drupal and teach us how it manage from the admin.
Leeming Dental Clinic is a well renowned dental clinic in Borehamwood, London. We are improving our business day by day. As i researched and found that Drupal is more secure than others. My last website is in WordPress but it was not good in responsive and mobile view. So that is also in my requirements to make this site responsive as well.

Please mention your email id and Contact details in comment.

Regards!
Andrew