I am new at stack-overflow. I have a question, please help me if anyone know .... I build a follower system in my web application where user can follow others and then he can see updates on his timeline. I have 2 tables
| tbl_follow |
|---------------------------
| id | follow | follow_by |
| 01 | joe | mark |
----------------------------
And second table is:
| timeline_tbl |
|-------------------------------
| id | staus | username |
| 01 | demo text | joe |
| 01 | demo text | adem |
--------------------------------
Now suppose login user is "mark". so mark will be able to see only "joe" status on his timeline because he followed him (see tbl_follow) " Can someone please help me... and thanks in advance for your time and sorry for my bad english
Currently i used this code
$sql = ("select * from tbl_follow where username = 'mark' ");
while($rows=mysql_fetch_assoc($sql))
{
$follow=$rows["follow"];
$asql = ("select * from timeline where username = '$follow' ");
$get = mysql_fetch_assoc($asql);
$status = $get['status'];
echo $status "<br>";
}