title: Mysql. Select data from 3 different tables based on column from 1 table
body: <p>Here is what I want to do:</p>
  
  <p>I have 3 tables: musicItems, photoItems, textItems<br>
  Each table has different columns. </p>
  
  <pre><code>Table "musicItems" 
    id
    Owner_id
    audioId
    url
    duration
  
  Table "photoItems" 
    id
    albumId
    userId 
    photoId
    url
  
  Table "textItems" 
    id
    msgText
  </code></pre>
  
  <p>And I have one more table </p>
  
  <pre><code>"footprints" 
    id
    itemType
    itemId
  </code></pre>
  
  <p>I need to retieve last 30 items from table "footprints" with all properties depending on itemType and itemId. How can i do that?</p>