create table friends
(
id int not null auto_increment,
user_id int,
friend_id int,
constraint fk_friends_accounts foreign key (user_id) references
accounts(id),
foreign key (friend_id) references accounts(id),
primary key(id)
);
this is my friends tables…friend_id is the field where ids of the
user are filled but before filling that friend_id field,a request is
to be sent to the user who is supposed to be added.
here i request suggestions for how to send that friendrequest…
i basically want to send a ping messages to user stating that “so n so
send u a friend request” when he logs in.
Will this be possible.I even don’t know where to start.any suggestions
plzzzzzzzzz.
you can render such “received requests” into a messages-view of your
logged in user. just store the friend_request the sender created as a
FriendRequest instance, set the name of the recipient and mark this
request with a meaningfull state (e.g request_sent)
then if a user is logged in, render its “received requests” area with
something like that