I have two tables. The first table contains simple user data and has columns
$username, $text, $image
(this is called "USERDATA").
The second table contains information about which users "follow" other users who are configured with columns
$username and $usertheyfollow
(this is called "FOLLOWS").
What I need to do is display the data separately for each user so that they are important to them. This means that userABC, for example, should be able to view the entries $textand $imagefor all users, he / she should be. For this, I believe that I need to write a sql query that includes the first check of who the registered user is (in this case userABC), then select all the instances $usertheyfollowin the FOLLOWS table, which has the corresponding value. "userABC."Then I need to return to my table USERDATAand select $textand $image, which is relevant $usertheyfollow. Then I can just display it with the echo command or the like ...
SQL-? ?