By BetaTheta on
Hi,
I'm writing a custom module and I've been stuck on trying to get 4 tables to join in views.
Here's the deal, I have Organic Groups and I want them to be associated with user roles. So I created a table with fields 'rid' and 'gid'. Now I need to create a view with argument the gid/nid of the OG. The view should show all the users associated with the user role associated with the OG.
I'm really stuck on how to do this. I think I need to get the users table and my custom table to join up. I tried using relationships, got stuck. Any help?
Comments
I'm not an expert of Drupal
I'm not an expert of Drupal and views.. ..but I already did something like that.
I think you have to :
Example :
I have a table called "news" that contains a nid (node id), vid and a date.
My ....views.inc file looks like :
I hope it will help.
P.S :
Excuse me for my english. That's not my first language.
Thanks, that did help. I
Thanks, that did help. I figured out that in my specific case I needed this following bit of code
chapters is the table containing the nid-rid information. By using left table, I was able to join the chapters table to the users table through the users_roles tables.