I'm trying to make a list of friends that are NOT in address book.
This returns all friends :
// Check for friends
$frnd="SELECT * FROM friends WHERE my_id='$_SESSION[user_id]'";
$fres = mysql_query($frnd);
$fnum = mysql_num_rows($fres);
while($fr=mysql_fetch_array($fres)){
$friend = $fr['friend_name'];
$friend_id = $fr['friend_id']; }
This returns all friends that are in address book:
// Lookup address book
$addy="SELECT * FROM address_book WHERE my_id='$myid'";
$abresult=mysql_query($addy);
$adnum=mysql_num_rows($abresult);
while($ab=mysql_fetch_array($abresult)){
$usr=$ab['email'];
$their_id=stripslashes($ab['their_id']);
$user_name=stripslashes($ab['nick']);
$their_username=stripslashes($ab['their_username']); }
How do I return all friends that ARE NOT in the address book ?