Logic For Dynamic Sql Query Switching Content Source
Viewed 3 times
I would like some help to write some SQL logic.
I currently have a scrapy bot collecting news on 10 sites.
News is updated daily on these sites.
I download them into an internal system, I need the news not to be shown by repeated sources.
It needs to work the same as Google Discover, randomizing the display of these news across news source sites.
It currently looks like this:
NEWS 1 : SITE A NEWS 2 : SITE A NEWS 3 : SITE A
NEWS 4: SITE B NEWS 5: SITE B
NEWS 6: SITE C NEWS 7: SITE C
I need this order to be more random, more fluid.
My system is in PHP / MYSQL.
Could you help me work out this logic? I'm lost on that, the dates are all the same day, and there's no hourly variation, just the entire date.