0
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 takes all the posts from the users I follow, along with some more information about them, such as their name, photo, and profile link that is stored in another table. This is working perfectly. However, it returns only the posts of the users I follow. I would like her to return my posts as well. What should I implement for this to happen?
Table structure:
u636623377_follows = pastebin. com/i4QfJBBH //junte os espaços
u636623377_posts = pastebin. com/tMUB5t5E //junte os espaços
u636623377_users = pastebin. com/sabLHx97 //junte os espaços
Do not use pastbin, use stackoverflow markup, friend, PLEASE READ: http://answall.com/help/mcve grateful :)
– Guilherme Nascimento