title: MySQL: How to fetch data with left-join if column contains multiple ids?
body: <p>Assuming the following:</p>
  
  <p>Table "info":</p>
  
  <pre><code> id | target_ids
  ----|------------
   1  | 2
   2  | 
   3  | 4,1
   4  | 2,3,1
  </code></pre>
  
  <p>Table "targets":</p>
  
  <pre><code> id | value
  ----|------------
   1  | dog
   2  | cat
   3  | tiger
   4  | lion
  </code></pre>
  
  <p>Using <strong>left join</strong>, I'm expecting something like this:</p>
  
  <pre><code> id | target_ids | value
  ----|---------------------
   1  | 2          | cat
   2  |            | 
   3  | 4,1        | lion,dog
   4  | 2,3,1      | cat,tiger,dog
  </code></pre>
  
  <p>I've tried this:</p>
  
  <pre><code>select info.*, targets.value from info left join targets on info.target_ids = targets.id
  </code></pre>
  
  <p>The results I got is single values in "value" column</p>
  
  <pre><code> id | target_ids | value
  ----|---------------------
   1  | 2          | cat
   2  |            | 
   3  | 4,1        | lion
   4  | 2,3,1      | cat
  </code></pre>
  
  <p>How can I get results as it's showing in the 3rd table? Thanks</p>