• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to related two tables

 
Syskata Mitev
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a simple user login and use this code to make two tables


I wont when I try to user_log.role_id to make call to role_id.role_name or something like that.
Can you someone help me to make relation ship between them whit role_id or give me a little more information how to make it possibility.
Thanks in advance!
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34695
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Syskata Mitev:
I wont when I try to user_log.role_id to make call to role_id.role_name or something like that.

I don't follow what you mean by this.


Can you someone help me to make relation ship between them whit role_id or give me a little more information how to make it possibility.

It sounds like you want to create a foreign key relationship between the two columns. This means that a column on one table (user_log) refers to the primary key of another table (role_id).
 
Syskata Mitev
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot. That's exacly whot i need. But i have a basic practice in this area so please give some example how to make it.
Thanks again.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34695
367
Eclipse IDE Java VI Editor
 
Syskata Mitev
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you. I find what i wont for now. JavaRanch rules;)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic