i am trying to get data from four tables with respect to the the “type”. Types can be comment, cover pic change, friend request accept etc. but the problem is the query i made is not working by repeating the types for all and timestamp for all. the query i made is
SELECT c.up_date, c.user_id, c.id, f.id,
f.up_date, f.friend1, f.friend2, f.status,
s.postdate, s.status, s.id, s.display_name, s.userid, s.userid1, s.type,
c.type, f.type
FROM cover_pic c, wp_userstatus s, wp_friends f
WHERE s.userid = f.friend1
AND s.userid = c.user_id
AND f.status =3
AND c.user_id =4
ORDER BY s.postdate
LIMIT 0 , 30
can anyone help me with the right query with respect to timestamp and the type
here is the result its giving me

what i want
timestamp userid_id id display_name type
233232323 1 1 paramveer comment
1212121212 1 2 paramveer coverpic
Maybe you want an
unionof joinsIt’s really hard to tell.