title: mySQL: Showing data from one table using id from another
body: <p>I want my users to be able to make a favourite list.</p>
  
  <p>I have two tables in a database in mySQL. One stores information about businesses and the other stores the unique user ids as well as the ids from the first table that the user has marked a favourite.</p>
  
  <p><strong>Table 1</strong></p>
  
  <pre><code>&lt;pre&gt;
  ID   | NAME | EMAIL      | PHONE    |
  1    | Joe  | a@mail.com | 25634565 |
  2    | John | b@mail.com | 43634565 |
  3    | Jack | c@mail.com | 65634565 |
  4    | James| d@mail.com | 43634565 |
  5    | Julie| e@mail.com | 65634565 |
  ...
  &lt;/pre&gt;
  </code></pre>
  
  Table 2
  
  <pre><code>&lt;pre&gt;
    USERID   |  FAV1  |  FAV2  |  FAV3  | FAV...
  2565325489 | 1      | 3      | 5      |
  8596854785 | 3      | 2      | NULL   |
  2356256263 | 5      | NULL   | NULL   |
  ...
  &lt;/pre&gt;
  </code></pre>
  
  The output I want for a user (in this example the first in table2):
  
  <pre><code>&lt;pre&gt;
  Joe  | a@mail.com | 25634565 |
  Jack | c@mail.com | 65634565 |
  Julie| e@mail.com | 65634565 |
  &lt;/pre&gt;
  </code></pre>
  
  <p>I have looked into JOIN LEFT and minus query calls, but I just can't make it work. I have a basic understanding of mySQL and PHP, but not a lot. </p>
  
  <p>I would highly appreciate any help with what approach to take. </p>
  
  <p>Ps. If there are better ways to structures my databases, I would love to know.</p>