Posted by joyseeker on July 1, 2010 at 12:25am
From what I find on drupal.org, Views does not work with external databases. I have a multisite setup but do not want to share the content tables, although I do want a View on the top domain across the subdomains' content.
(I have a workaround by manually copying and pasting links to selected subdomains' content in a new content type on the top domain when I want to display a block on the top domain, but I will have to constantly maintain and update it.)
Any thoughts about accessing external databases in Views, whether there will be a way to do this soon (perhaps in D7), or other ways to approach it?
Susan

Comments
You can export the view from
You can export the view from the main site and import it into the subdomains, but you would still have to update the info across the subdomains
Maybe you could set it up as a feed from the main domain and set up a feed aggregator in the subdomains. Then format the feed..
Edit: This link may be helpful - http://drupal.org/node/314097
Use a module?
For example, I can address WordPress database tables on another mySQL server on my network and create an SQL VIEWs in my Drupal database that uses the full network name for the external database tables I need. Then hook them in using the mods (see url's below). Not sure if this works easily across different vendor's SQL server's but the addressing is part of the SQL standard, so maybe.
http://drupal.org/project/ctools
http://drupal.org/project/schema
http://drupal.org/project/tw
YMMV,
Markus
UPDATE: very strange. I see a "one" in front of first and third paragrahs in safari 5/mac. I though I made a typo. When I edit it shows there is a 'two' in front of the third paragraph. Does anyone else see the two 'ones'? Very odd.
The Markdown input format has
The Markdown input format has been misbehaving on this site since the beginning (in 2006!). In the future, put a
before list numbers or just select the "Filtered HTML -- No Markdown" input format.Markdown is as Markdown is.
Markdown is as Markdown is. The problem is that it often causes unusual behavior for those who aren't familiar with it. Perhaps the non-Markdown filter should be the default, but those of us who are familiar with it can toggle a switch in our profiles to make the Markdown one default for us…?
The Boise Drupal Guy!
Actually, Views 2 can already
Actually, Views 2 can already work with external databases. You just have to write the gasket layer using the Views API. Assuming you have Views and Advanced Help installed, see the Views API documentation... specifically, the section titled Describing tables to Views, which has a section describing the database attribute:
and here's a forum post from someone using this method.
Views API
Cool. I like that approach even better. probably much lighter weight and simpler solution that using all of TW and Schema. Thanks!
Thanks for the ideas
I'll check them out.
Susan
Some fresh thinking on multisite contnet sharing
I just read this article The Drupal service cloud where Kristoff explain content sharing between multiple sites: The following are interesting remarks:
<
blockquote>
When planning a complex set of interconnected services, you have 3 options:
Scenario A used to be the default choice: keep the data in one Drupal database and then do some node access magic, classical examples of this technique are Drupal's great “content separation tools”: Organic groups and the Domain access modules.
May be this thread can help:
May be this thread can help: http://drupal.org/node/576694
shareing views tables from one database?
http://groups.drupal.org/node/46188#comment-121096
May be this is a pointer in the right direction? May be this way you can share the views tables across the sub domain sites?
best way to share views across multiple site
hi
i am new to drupal development. i am not sure this is the right place to pop my question.anyway i am building multiple site with drupal and getting a bit confused about what's the best way to share views across the multiple site.have searched around various topics and there are so many ways of doing it now am confused about which is the best way.which must be scalable with out much effort.
i have bit of complication with using domain access as i am using separate settings.php files and separate databases for each sub domain.
can anyone please suggest me....?