• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

role_id in jforum_roles and jforum_role_values

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
INSERT INTO jforum_roles (role_id, name, group_id, role_type ) VALUES (@ROLE_ID + 9, 'perm_read_only_forums', @GENERAL_GROUP_ID, 0);
INSERT INTO jforum_roles (role_id, name, group_id, role_type ) VALUES (@ROLE_ID + 10, 'perm_read_only_forums', @ADMIN_GROUP_ID, 0);

INSERT INTO jforum_role_values ( role_id, role_value, role_type ) VALUES (@ROLE_ID + 9, '1', 1);
INSERT INTO jforum_role_values ( role_id, role_value, role_type ) VALUES (@ROLE_ID + 10, '1', 1);

What is the correlation between the role_id in jforum_roles and the role_id in jforum_role_values? In the above SQL, role_id is set to 0 for jforum_roles but 1 for jforum_role_values.
[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
role_id is never 0.. I guess you refer to role_type..

When a role has values (in jforum_role_values), the "role_type" from jforum_roles is not necessary, as we only care about the records from role_values

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ah, I see. A good place to refractor as you migrate to Hibernate.
[originally posted on jforum.net by sru]
 
There were millions of the little blood suckers. But thanks to this tiny ad, I wasn't bitten once.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic