linux1880 Posted August 8, 2010 Share Posted August 8, 2010 Hi all, i am creating a custom blog for practise, how do we add no of clicks in database to that topics visitors clicks. I have added 'clicks' field in table 'blog_posts'. Now how to add and increment value by 1 when visitors visits that topic ? Quote Link to comment Share on other sites More sharing options...
Yesideez Posted August 8, 2010 Share Posted August 8, 2010 In the script that displays the topic have something like this: mysql_query("UPDATE topic SET click=click+1 WHERE topicid=".$topicid); Quote Link to comment 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.