title: How do I take all the values of a single row under the few id s in PHP Laravel?
body: <p><a href="https://i.stack.imgur.com/LohKB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LohKB.png" alt="enter image description here"></a></p>
  
  <p>This is the output of the select query &amp; I used join query from three tables. How do I take all the values of a single row of id=5 and all of the values of a single row of id=7? </p>
  
  <pre><code>$data = DB::table('col3')
         -&gt;join('col2', 'col2.Record_ID', '=', 'col3.Record_ID')
         -&gt;join('col1', 'col1.Record_ID', '=', 'col2.Record_ID') -&gt;select('col1.*', 'col2.*', 'col3.*')
         -&gt;orderBy('col1.Time','desc')         
         -&gt;get();
  </code></pre>