I think to use INNER JOIN on the users table. Maybe the field 'blocked' clould be skipped, and use 'confirm' to verify.
0: deny
1: confirmed
2: pending
3: blocked
$me = $GET['me']; // or $SESSION
SELECT * FROM friends AS a INNER JOIN users AS b on a.me=b.username WHERE a.me ='$me'
and with PHP
..while {
$conf = $row['confirm'];
if ($conf ==0) {
$friend_status = "Not friend";
} elseif($conf ==1) {
$friend_status = "Is friend";
}
}
Will it do, or should i do it some other way? 😛
Edited:
I fount a tutorial at http://rmb-scripting.com/tutorials.php?tutorial&tid=282
They made a table 'friend_requests' that seem to better.
good 🙂