title: Query for fetching data from multiple tables
body: <p>I am having following tables</p>
  
  <pre><code> spam (element_id, spam_table,spam_by,add_date)
  </code></pre>
  
  <p>here (element_id,spam_by) is primary key
  and spam_by is foreign key depends on id of user</p>
  
  <pre><code>user(id,fname,lname)
  </code></pre>
  
  <p>id is  primary key</p>
  
  <pre><code>profile_pic(pic_id,profile_p,userid)
  </code></pre>
  
  <p>userid is foreign key depends on id of user</p>
  
  <pre><code>comments( comment_id, comment_on, commented_by, comment_date, comment)
  </code></pre>
  
  <p>comments_id is primary key, comment_on is foreign key depends on id of elements
   commented_by  foreign key depends on id of user</p>
  
  <pre><code> elements(id,name)
  </code></pre>
  
  <p>id is primary key</p>
  
  <p>from the above table.
  I want to fetch following details from above tables</p>
  
  <pre><code> commented userid, name,pic,comment,commemt on element,spam userid, name,pic
  </code></pre>