automatic notification in database change :similar with facebook friend request
i wish to develeop a php mysql based social networking site. Registered users will have the option to add another user as a friend just as is done in Facebook. If user A clicks on the 'add friend' link on user B's profile, friend-request records will be made in A's and B's databases accordingly. When B visits the waiting friend-requests- showing-page ( as such the profile page), the request will be shown querying B's db.This much is pretty simple to do i think. But while B is online, C can make a friend-request to B. I want to make a notification to B that C has made such a request even if B