title: Best way to get data from multiple tables
body: <p><a href="https://i.stack.imgur.com/7iHu1.png" rel="nofollow"><img src="https://i.stack.imgur.com/7iHu1.png" alt="enter image description here"></a></p>
  
  <p>I want to get data from 3 tables above and store in an array like this.</p>
  
  <p><a href="https://i.stack.imgur.com/hnU5F.png" rel="nofollow"><img src="https://i.stack.imgur.com/hnU5F.png" alt="enter image description here"></a></p>
  
  <p>Can only one query join multiple tables and return the array I need?</p>
  
  <p>Or I write query for each table then combine 3 arrays? (Get all IDs in table A, look up the values of table B and C that ID matched)?</p>
  
  <p>Which one is more effecient?</p>
  
  <p>If possible, please write a sample code.
  Thank you.</p>