Hello ...
I have the following query:
$conexao = connect();
$consulta3 = mysql_query("SELECT meu.id, f.idfollowed, eu_sigo.fname, eu_sigo.id, eu_sigo.profile, eu_sigo.photoperf, p.id, p.title, p.link, p.description, p.descr, p.url, p.photo, p.visivel, p.type, p.description, p.data
FROM u636623377_users AS meu
INNER JOIN u636623377_follows AS f ON f.idfollower = meu.id
INNER JOIN u636623377_users AS eu_sigo ON f.idfollowed = eu_sigo.id
INNER JOIN u636623377_posts AS p ON p.userid = f.idfollowed
WHERE meu.id = '$idperf'"); # id do usuário logado
This query picks up all user posts I follow, along with some more information about them, such as name, photo, and profile link that are stored in another table. This is working perfectly. However, it only returns the posts of the users I follow. I wish she would return my posts as well. What should I implement to make this happen?
Table structure:
u636623377_follows = pastebin. com / i4QfJBBH // join the spaces
u636623377_posts = pastebin. com / tMUB5t5E // join the spaces
u636623377_users = pastebin. com / sabLHx97 // join the spaces