kirkh34 Posted October 21, 2010 Share Posted October 21, 2010 i have videos that multiple users can view.... for each video i'd like to track how many times each user has viewed that specific video... i'm not sure if i'm on the right track but... i set up a table in the database with two fields...user_id and vid_id... now everytime a user views the vid... the table updates with the vid_id and the user_id... this is where I am stuck... I would like to select all videos in the table and count how many times each user is matched with the same video id to get the number... but how could I do this for all of the users? If anyone has any ideas it is appreciated...and if someone thinks there is a better way to accomplish this that would be awesome too.. thanks!! Quote Link to comment https://forums.phpfreaks.com/topic/216430-see-individual-user-views/ Share on other sites More sharing options...
fenway Posted October 23, 2010 Share Posted October 23, 2010 With GROUP BY. Quote Link to comment https://forums.phpfreaks.com/topic/216430-see-individual-user-views/#findComment-1125630 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.