Currently one can only map Drupal tables to views. It would be great if one could also map tables in other databases (on the same server) to views.
For example, if one installs a non-Drupal package like Wikimedia or FUDforum, one can easily integrate them into the Drupal framework using views.
Comments
Comment #1
merlinofchaos commentedOff the top of my head, I'd say this would only be possible if you can get them into the same database space. Since Drupal uses db prefixes, this might actually be possible.
At which point, Views doesn't need any modification at all, you have to tell views about the data and how to join it to the node table.
If it's in another database space...that's a little beyond my abilities. I don't know how to do joins across databases.
Now, I have a plan sitting on the back burner to detach views somewhat from the node table, so it may become possible to have views manage stuff that isn't nodes, but the plan still has a few bugs.
Comment #2
merlinofchaos commentedI'm marking this postponed in an attempt to reduce the number of active issues, but to not actually close the issue. There's some merit to this. It requires discussion.
Comment #3
joemoraca commentedI would love this feature. Just one use case ... I created a custom form to enter URLs for website (with taxonomy mapping). I want a "view" to view them all on one page -- using exposed filters would be awesome
I am doing this with PHP in a page node for now.
Comment #4
moshe weitzman commentedyou can easily join tables across databases using drupal's prefixing feature. just put your database name in the prefix. anyway, the resulting query is something like
SELECT * FROM drupal.user du INNER JOIN fudforum.user fu ON du.name=fu.name
Comment #5
nancydruI'd certainly vote for at least detaching the users table from the node table. I really don't want to see 657 pictures of myself when I want to list users in a particular role.
Comment #6
sunThis issue has been resolved in Views 2.
Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #8
giorgio79 commentedHi Sun,
Could you point to some documentation explaining how I can do this in Views 2, or 3?
Comment #9
giorgio79 commentedFound it, inside advanced help
yoursite.com/help/views/api-tables
PS For anyone looking for an automated way, check out http://www.drupal.org/project/data