This means that your query is not returning any results at all. It's checking the data and returning an array of zero elements. No records match the criteria in the select statement. Since this is (probably) test data at this point, either your test data is not set up to produce the results you expect, or your query is traversing the data in a way you different than you want.
If you are running my example code above, did you set some value for $user['id'] before running it?
$user['id']='1234ABCXYZ';
$result = mysql_query( "SELECT users.username....
If you are having problems:
There are several likely places to look:
Echo out your query before you run it: has the variable been properly set here?
WHERE freinds.mid = '".$user['id']."'"
Then make sure that you have a record in users and a record in friends that will match up with your test. Make sure the users.id of the users recordd EXACTLY matches the friends.fid element. Of course you want to be sure that the friends.mid elemet EXACTLY matches the $user['id']