title: Get all values from intermediate table
body: <p>I have a mySQL three-table many-to-many setup with link table, simplified here:</p>
  <pre><code>categories
    category_id
    category_name
  
  categories2entries
    category_id,
    entry_id
  
  entries
    entry_id
    entry_text
  </code></pre>
  <p>I need to return all entries for a given category name but I want to include a list of all the categories a given entry is attached to. For example, if a search is for <code>Addictions</code> and the entry is also listed in categories <code>Mental health</code> and <code>Young people</code>, I want an output field for each result with all three categories listed.</p>
  <p>How do I do this?</p>