friends and users |
-2 down vote favorite
i am making a friend system for a social networking kind of website.i have completed the search part now i am working on adding friends.so when a logged in user visits a other guy's profile he can send him friend request.so on clicking the button i am taking two parameter one is friend's id and other is user's id and passing it to the model.my tables are user_login for users and friends have 1)user_id1 2)friend_id1 and so on.so now i want to pass my data that i have recieved after clicking on the add friend button to the database and for that i have to join the two tables.i.e user_login and pivot table friends.so thaton clicking these id's get saved in that pivot table.just wanted someone to help me with the joining of tables.since it is showing me error. my code for model is Code: public function display_followers($user_id,$friend_id) my code for controller is Code: public function followers(){ |
Messages In This Thread |
friends and users - by anmol - 04-12-2017, 11:21 AM
RE: friends and users - by xenomorph1030 - 04-14-2017, 05:05 AM
|