i already configured my drupal instance for multiple databases (settings.php), i want to show contents from my external database in a view but i don't know how to do it? could you please give me a hand?
im using the last version of drupal 8.26. i know is not to much but i could offer you a 10 euros gift card.
I was able to get data from external database, refer to http://www.drupal8.ovh/en/comment/144#comment-144.
But it's not inside of view, just top of header, I mind echo the result inside of page. How to passed the result of external db to inside of view. How about view_hooks_data?
Is this way possible for different host? I want to get some data from online database then show them into my site on localhost . On item host I change with "localhost" with IP from my online database.
I have setup a multisite in Drupal 8 having one master site and 2 child sites, one child site have same db with prefix and 2nd child site having external db. How can I use only users and users_role tables from db of master site in slave site with external db.
There are not any memory issues regarding gadget what so
ever. It has an internal 256 MB which are extended via microSD,
as many as 32GB. Camera is of 2 MP in addition to a photo of resolution as high as 1600x1200 pixels can be captured. http://tunaniece11.beep.com/secrets-your-parents-never-told-you-about-mobile-insurance-2017-06-13.htm?nocache=1497321231
But my problem is that I can see my tables from my second database 'ma_base' when I want to create a view. Thank you for pointing out the problem if there is either to help me to make a good configuration.
Comments9
i already configured my drupal instance for multiple databases..
i already configured my drupal instance for multiple databases (settings.php), i want to show contents from my external database in a view but i don't know how to do it? could you please give me a hand?
im using the last version of drupal 8.26. i know is not to much but i could offer you a 10 euros gift card.
Blessings!
Use hook_views_data
Hello, Fore that, you can use hook_views_data. you have a tutorial here.
Passing result of external db to view
Hello,
I was able to get data from external database, refer to http://www.drupal8.ovh/en/comment/144#comment-144.
But it's not inside of view, just top of header, I mind echo the result inside of page. How to passed the result of external db to inside of view. How about view_hooks_data?
Thanks
Possible with different host?
Hello, thank's for the article.
Is this way possible for different host? I want to get some data from online database then show them into my site on localhost . On item host I change with "localhost" with IP from my online database.
Thank's.
Yes, Just set the host
Hi,
You can use this method with different host, table, database (mysql, mariadb, sqlite ....)
Thanks
Wow, its great!.. thanks.
Wow, its great!.. thanks.
How can I share user table of master site into child sites
Hi,
I have setup a multisite in Drupal 8 having one master site and 2 child sites, one child site have same db with prefix and 2nd child site having external db. How can I use only users and users_role tables from db of master site in slave site with external db.
Use multiple / external databases in Drupal 8 | Drupal 8
There are not any memory issues regarding gadget what so
ever. It has an internal 256 MB which are extended via microSD,
as many as 32GB. Camera is of 2 MP in addition to a photo of resolution as high as 1600x1200 pixels can be captured. http://tunaniece11.beep.com/secrets-your-parents-never-told-you-about-mobile-insurance-2017-06-13.htm?nocache=1497321231
Hello…
Hello
In fact I use drupal 8 with the view database connector but I did the connection of my second database. Here is my configuration
$ databases ['default'] ['default'] = array (
'database' => 'bd_drupal8',
'username' => 'root',
'password' => '',
'prefix' => '',
'host' => 'localhost',
'port' => '3306',
'namespace' => 'Drupal \\ Core \\ Database \\ Driver \\ mysql',
'driver' => 'mysql',
);
$ databases ['external'] ['default'] = array (
'database' => 'student',
'username' => 'root',
'password' => '',
'prefix' => 'etu_',
'host' => 'localhost',
'port' => '3306',
'namespace' => 'Drupal \\ Core \\ Database \\ Driver \\ mysql',
'driver' => 'mysql',
);
But my problem is that I can see my tables from my second database 'ma_base' when I want to create a view. Thank you for pointing out the problem if there is either to help me to make a good configuration.