For your first problem, give each user their own table when they create their user profiles which contains all the blog entries for that user. Pretty straightforward. If you managed to create the rest then you should have no difficulties. Have fields for time and date etc., all the standard stuff you'd see on a blog entry.
For the other problem, another table for each user will have a list of other user IDs that are on their friend's list and whether or not the other user has confirmed the friendship or not. For unconfirmed friends (e.g. John has added Mary as a friend but she hasn't accepted yet {and hasn't declined either}), compare the user's (John's) friends list with the target user's (Mary's) friends list. If both users exist on each other's tables, change the confirmed status to true on both users' tables.
If a user declines friendship, delete the entry from both tables completely.
So any time that list is checked, the confirmed friends will be listed off, and the unconfirmed ones will be ignored until they're confirmed.
Might sound confusing, but i'm sure you get the general idea.
*edit* yeah, or use free code. :)
__________________
Subtlety is my middle name... and first and last in case you didn't get the point.
|