I have 2 tables in mysql frnd_request and nsm_post, I want to show the post as per user share post of primary school partner, Etc. related to secondary school
frnd_request table referece is the column whose users are connected to each other. Table structure below
1 ID2 user_id 3 frnd_id 4 position 5 response (how friends interact with each other Primay, secondary school partner) 6 confirmation 7 note 8 date
The NSM_post post table is show_to field which defines that the friend group logged by the user this post Can see.
1 ID2 UID (User ID of the user who posted this post) 3 post 4 IP5 Show_to (which friends group post will be displayed) 6 Img_video_name 7 date
SELECT nsm_post.post frnd_request, from nsm_post WHERE frnd_request.user_id = nsm_post.uid < / Code>
This should work. I think what you are trying to do is blocking the posts to the user's school friends, but it is not really possible with your current table structure, you need to set up an extra table like this:
primary | Uid1 UID2 | Type
0 | 10004 | 10005 | School Friend
No comments:
Post a Comment