I am having following tables
spam (element_id, spam_table,spam_by,add_date)
here (element_id,spam_by) is primary key and spam_by is foreign key depends on id of user
user(id,fname,lname)
id is primary key
profile_pic(pic_id,profile_p,userid)
userid is foreign key depends on id of user
comments( comment_id, comment_on, commented_by, comment_date, comment)
comments_id is primary key, comment_on is foreign key depends on id of elements commented_by foreign key depends on id of user
elements(id,name)
id is primary key
from the above table. I want to fetch following details from above tables
commented userid, name,pic,comment,commemt on element,spam userid, name,pic
commented, is that your new table ??