title: Using data from two different tables in the same database linked by role_id
body: <p>I've got several tables in my database (MySQL) and am trying to link the data. I'm not sure a join is what I need, but I may be wrong. Here's what I'm trying to do:</p>
  
  <p>I want to display the users role (admin, owner, etc) based on the role_id.  Here are the two tables I've got:</p>
  
  <p>table: users</p>
  
  <pre><code>fields: user_id | role_id | user_name |etc (other fields)
  </code></pre>
  
  <p>table: user_roles</p>
  
  <pre><code>fields: role_id | role_name
  </code></pre>
  
  <p>I want the user's role (role_name) to display based on what the role_id is. It would sort of require linking data from user_roles and users, right? I'm honestly not sure. So, if role_id is 1 and role_name is Owner, I want role_name to be what displays BASED on the role_id in the users table. If that makes sense?</p>