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 ? Link to comment https://forums.phpfreaks.com/topic/210114-how-to-add-no-of-clicks-in-database/ 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); Link to comment https://forums.phpfreaks.com/topic/210114-how-to-add-no-of-clicks-in-database/#findComment-1096548 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.