title: Select from mapping table
body: <p>I have 3 tables,</p>
  
  <pre><code>categories:
  ID, category
  "1","Cars"
  "2","Trucks"
  "3","Bikes"
  "4","Planes"
  "5","Boats"
  
  users:
  ID, username
  "1","john"
  "2","bob"
  "3","billy"
  
  users_categories:
  ID, userid, categoryid
  "1","1","1"
  "2","1","2"
  "3","2","2"
  "4","3","3"
  </code></pre>
  
  <p>Now I need to select users who have multiple categories(that i specify), so in this example, I need a query that selects only the user "john" who has categories 1 and 2. I will pass the categories that I need in the query. i.e 1 and 2.</p>