将MySQL搜索输出限制为10

I am trying to create a social network. In the profile details I want to display at least 10 friends of that profile user. I used:

$connect = mysqli_connect("...","...","...","dbname"); //NOT REALLY IMPORTANT
$find = "SELECT * FROM friendslist WHERE user1 = '$myusername'";
$exec = mysqli_query($connect,$find);

while($row=mysqli_fetch_assoc($exec)) {
$friendusername = $row['user2'];

$con2 = "SELECT * FROM users WHERE username = '$friendusername' ";
$exec2 = mysqli_query($con,$con2);
$row2 = myslqi_fetch_assoc($exec2);

echo $row2['firstname']."<br/>";

My tables:

FOR friends:
id, user1, user2

FOR users
id, username, firstname

It will display all my friends like if I have 20 friends, it will display all 20 of them. How can I limit it to display only 10?

Try:

$find = "SELECT * FROM friendslist WHERE user1 = '$myusername' LIMIT 0, 10";

Like @Danijel's answers, good option is join the tables.

First join tables, get friendlist with f.user1 = '$myusername' and later limit it to ten.

PD: Don't do queries in a loop, it's bad for perfomance

$find = "SELECT * 
         FROM friendslist  f, users u
         WHERE     f.user2 = u.username 
               AND f.user1 = '$myusername' 
         LIMIT 10";

        $exec = mysqli_query($connect,$find);

        while($row=mysqli_fetch_assoc($exec)) {

              echo $row2['firstname']."<br/>";
        }

Join the queries and limit to 10.

"SELECT * FROM friendslist LEFT JOIN users ON friendslist.user2=users.username WHERE user1 = '$myusername' LIMIT 10"