For a website I am doing I am tracking views, likes and ratings on posts.
I get a ton load more views than I do ratings or likes. What I want to be able to do in real time is query the database and update a 'whats happening now' area via AJAX. The problem: I don't want them all to be views.
Is there a way to select a distributed list of views, likes and ratings?
DB Table:
ItemId, TrackingTypeId, DateTimeOfTrack
basically I would like a mix of items from the table, without them all just being views.
I have thought about doing a SELECT TOP and UNION but then when I automatically update it will always just be views most of the time.
I get a ton load more views than I do ratings or likes. What I want to be able to do in real time is query the database and update a 'whats happening now' area via AJAX. The problem: I don't want them all to be views.
Is there a way to select a distributed list of views, likes and ratings?
DB Table:
ItemId, TrackingTypeId, DateTimeOfTrack
basically I would like a mix of items from the table, without them all just being views.
I have thought about doing a SELECT TOP and UNION but then when I automatically update it will always just be views most of the time.