How to Setup Feed Query

Discussion in 'Frequently Asked Questions' started by appyet, Feb 13, 2015.

  1. appyet

    appyet Support Team Member
    Staff Member

    Joined:
    Feb 2, 2015
    Messages:
    1,286
    Likes Received:
    443
  2. beautiheart

    beautiheart Member

    Joined:
    Feb 3, 2015
    Messages:
    72
    Likes Received:
    6
    Hi,
    Do you have any idea about a feed query for not showing duplicate articles from differents feed modules but from the same website.
    Example:
    Category A contain article1 and CategoryB contains the article1 too.
    So in the last 24hours articles, it will show article1 twice.
    i want to get rid of the second one.
    Thank you
     
    #2
  3. appyet

    appyet Support Team Member
    Staff Member

    Joined:
    Feb 2, 2015
    Messages:
    1,286
    Likes Received:
    443
    if you know sql, there might be a way to SELECT DISTINCT.
     
    #3
  4. BOCo23

    BOCo23 New Member

    Joined:
    Feb 16, 2015
    Messages:
    2
    Likes Received:
    0
    IsDeleted = 0 AND FeedId IN (SELECT DISTINCT FeedId FROM Feed WHERE GUID IN ('***','***','***',...,'***'))

    This is not the best way and it's not working. Maybe some other idea?
     
    #4
    Last edited: Feb 22, 2015
  5. joseph raphael

    joseph raphael Well-Known Member

    Joined:
    Feb 3, 2015
    Messages:
    776
    Likes Received:
    312
    It's working fine for me, make sure you put the feed GUID not the module GUID.
     
    #5
  6. BOCo23

    BOCo23 New Member

    Joined:
    Feb 16, 2015
    Messages:
    2
    Likes Received:
    0
    Now is working. Looks like I've had a mistake in query.

    Thx!
     
    #6
  7. joseph raphael

    joseph raphael Well-Known Member

    Joined:
    Feb 3, 2015
    Messages:
    776
    Likes Received:
    312
    Good to know.. I hate SQL :confused:
     
    #7
  8. Mayapur Voice

    Mayapur Voice New Member

    Joined:
    Dec 18, 2015
    Messages:
    14
    Likes Received:
    6
    Tried this too....can't figure out how it works :-(

    I am sure so many people have this problem especially those pulling feeds from the same website using different categories and not all people know sql queries. For the time being I am forced to remove the "last 24 hours" module along with one more that I had created for last 30 days...
     
    #8
  9. Francois Lemoine

    Francois Lemoine New Member

    Joined:
    Jan 9, 2018
    Messages:
    5
    Likes Received:
    0
    I've tried it and doesn't work at all because the disctinct clause is on feed guid and not on post_id, so if the same post appears in two feeds, the disctinct clause won't work and won't dedup the post.
     
    #9

Share This Page