You can't use a onetime query for that as all the information is stored in the userlist table. So, if someone adds you as a friend, you are listed as 'buddy' 'pending'. Then when you accept the friendship request, you are listed as a 'buddy' 'yes' (or if you said no, then a 'buddy' 'no'). But every one of a users contacts/friends gets listed in that table. So, if userid 100 signs up, he won't get listed if you already ran the query. You really need to write a plugin that adds it automatically when the user registers. If you don't know how to do that, you may want to consider paying someone to do that for you.
|