Jump to content

Need help to filter tecnique for newsfeed


KFlash32

Recommended Posts

Hi

 

Need some help here to figure out how I can filter out something from a newsfeed Im creating. The principle are simple. One query get all the uses friend, and show the feed. Thats okey.

 

Problems starts here. I have created a function now so let the users choose if he / she want to see other friends photos or videos in this feed. All that information are stored in a second MySQL table.

 

What I try to do, is to filter this out, so not the spesific users photo OR video are visible in the stream for the users who does not want to see that kind of stuff.

 

I figured out I cant do that in mysql with a line like this

 

photo_id NOT IN (SELECT PHOTO ID FROM PHOTOS LEFT JOIN FILTER TABLE WHERE PHOTOS_OWNER = FILTER_FRIEND  WHERE FILTER_OWNER = ME AND PHOTO_FRIEND = MY_FRIEND AND PHTOS = 1

 

in that way, it would simple not show that current photo if the ID match the ID in the PHOTO table.

 

But not so easy was it not.

 

So I try to figure out the best way to sort this off.

 

Any help would be preciated.

 

 

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.