Først anbefales det at bruge eksplicitte JOINS over implicit CROSS JOIN
Prøv følgende forespørgsel.
SELECT
T.postID,
T.message,
T.time,
U.userID,
U.name,
U.username,
U.picture_url,
F.userID2,
FROM
users AS U
INNER JOIN
follow_user AS F
ON U.userID = F.userId1
INNER JOIN
post AS T
ON T.pUserID = U.userID OR T.pUserID = F.userId2
WHERE
U.userID = '$uid' //$uid holds the id of the current logged in user
order by T.postID DESC;