I was looking forward to add a feature to my project which can tell us how many times the post has been viewed, but just can't get how is it done. I am not a programming expert but still have good knowledge of php, mysql so if anybody can just give me idea how it is done. Currently I display all posts on main page and on clicking title of post user gets redirected to post page were full post is displayed so surely something is to be done on post page but what I have to count their?
Harman_2 0 Newbie Poster
Recommended Answers
Jump to PostThe way you want it (without counting only special views e.g. from members) is quite easy. Add a “viewed” int counter with default 0 , in your table and each time the app displays the full post update it incrementing it by one e.g. (SET viewed = viewed + 1)
All 3 Replies
jkon 672 Posting Whiz in Training Featured Poster
Taywin 312 Posting Virtuoso
jkon 672 Posting Whiz in Training Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.