feri_soft Posted October 8, 2006 Share Posted October 8, 2006 How to create a simple view counter?CAn it work just by adding one query to update views in the beggining of the file?? Quote Link to comment https://forums.phpfreaks.com/topic/23334-views-counter/ Share on other sites More sharing options...
.josh Posted October 8, 2006 Share Posted October 8, 2006 sure, you can do that. are you asking how you would perform the update query? Quote Link to comment https://forums.phpfreaks.com/topic/23334-views-counter/#findComment-105779 Share on other sites More sharing options...
feri_soft Posted October 8, 2006 Author Share Posted October 8, 2006 The problem is that i have a search query and it returns some results and then when click i go to another file and vie the details using get command...i am not sure where to put tha update query Quote Link to comment https://forums.phpfreaks.com/topic/23334-views-counter/#findComment-105833 Share on other sites More sharing options...
Orio Posted October 8, 2006 Share Posted October 8, 2006 You can put it at the very start of the file.Orio. Quote Link to comment https://forums.phpfreaks.com/topic/23334-views-counter/#findComment-105837 Share on other sites More sharing options...
redarrow Posted October 8, 2006 Share Posted October 8, 2006 i am sure this is correct?little example.[code]<?php$query-"update counter set counting=counting+1 where id='$id'";$result=mysql_query($query);?>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/23334-views-counter/#findComment-105838 Share on other sites More sharing options...
feri_soft Posted October 9, 2006 Author Share Posted October 9, 2006 nice one :D Quote Link to comment https://forums.phpfreaks.com/topic/23334-views-counter/#findComment-106257 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.