Reset all hits to ZERO

Need help with the Administration of your Joomla! 1.5 site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
kVadrum
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Fri Feb 29, 2008 11:01 am
Location: nyc
Contact:

Reset all hits to ZERO

Post by kVadrum » Sat Mar 22, 2008 2:03 am

Anyone can recommend the best/easiest way to reset all hit counters to zero?

Many thanks,

:kV

User avatar
snadowitz
Joomla! Guru
Joomla! Guru
Posts: 764
Joined: Wed Jan 18, 2006 4:40 am
Contact:

Re: Reset all hits to ZERO

Post by snadowitz » Sat Mar 22, 2008 5:04 am

using an sql script - I can't remember the exact one but you need to login to your mysql db using PHPMyAdmin and run something like:-

update jos_content set hits=0
Snadowitz

kVadrum
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Fri Feb 29, 2008 11:01 am
Location: nyc
Contact:

Re: Reset all hits to ZERO

Post by kVadrum » Sat Mar 22, 2008 5:14 am

sounds good - much more attractive than doing it by hand.

anyone else can confirm?

i'm an absolute mySQl virgin - and just days ago, totally destroyed the site working in phpAdmin.

Thanks,

:kV

kVadrum
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Fri Feb 29, 2008 11:01 am
Location: nyc
Contact:

Re: Reset all hits to ZERO

Post by kVadrum » Sat Mar 22, 2008 3:37 pm

Worked like a charm. Thanks!

:kV

dfrusher
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Fri Apr 18, 2008 8:02 am

Re: Reset all hits to ZERO

Post by dfrusher » Fri May 02, 2008 11:48 pm

Now, can anyone tell us how to READ the counters in bulk?????

Don

User avatar
snadowitz
Joomla! Guru
Joomla! Guru
Posts: 764
Joined: Wed Jan 18, 2006 4:40 am
Contact:

Re: Reset all hits to ZERO

Post by snadowitz » Sat May 03, 2008 4:34 am

run this simple query in phpmyadmin

Code: Select all

select title,hits from jos_content
Gives you this:-

Image
Snadowitz

Ace__
Joomla! Intern
Joomla! Intern
Posts: 64
Joined: Thu Sep 27, 2007 1:42 pm

Re: Reset all hits to ZERO

Post by Ace__ » Wed Jun 25, 2008 10:16 am

snadowitz wrote:update jos_content set hits=0
Bravo! Worked perfect. Such a simple solution.

Many Thanks!!!

User avatar
snadowitz
Joomla! Guru
Joomla! Guru
Posts: 764
Joined: Wed Jan 18, 2006 4:40 am
Contact:

Re: Reset all hits to ZERO

Post by snadowitz » Thu Jun 26, 2008 5:26 am

The simple solutions are always the best...
Snadowitz

User avatar
rootwiley
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Fri Jul 11, 2008 11:32 am
Location: Michigan (Home)/Iowa (College)

Re: Reset all hits to ZERO

Post by rootwiley » Thu Aug 07, 2008 2:13 pm

Sandowitz, can you tell me where I "run" the script
update jos_content set hits=0
I have access to myPHPadmin but I don't know where to put that.

Thanks.

User avatar
snadowitz
Joomla! Guru
Joomla! Guru
Posts: 764
Joined: Wed Jan 18, 2006 4:40 am
Contact:

Re: Reset all hits to ZERO

Post by snadowitz » Thu Aug 07, 2008 3:30 pm

HI - when you open phpmyadmin you select your database from the panel on the left had side. Once you have done this you see a bunch of stuff - all the joomla tables. At the top of the page you wil see 6 tabbed fields. One of them is marked 'sql' - click the tab and a new page opens with a box that says something like "run sql on database bxbxbxbxb" - paste your sql staement into this box and click the "go" button - you would see a success or failure message after that - OK?
Snadowitz

freddred
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Thu Jun 05, 2008 7:52 am

Re: Reset all hits to ZERO

Post by freddred » Sun Aug 10, 2008 6:17 pm

Hi,

When I ran this script it reset all the hits counters to zero but they have remained at zero ever since. Any ideas why this might be?

User avatar
snadowitz
Joomla! Guru
Joomla! Guru
Posts: 764
Joined: Wed Jan 18, 2006 4:40 am
Contact:

Re: Reset all hits to ZERO

Post by snadowitz » Tue Aug 12, 2008 10:00 am

probably no one visited the pages - the script can't make this happen...
Snadowitz

freddred
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Thu Jun 05, 2008 7:52 am

Re: Reset all hits to ZERO

Post by freddred » Tue Aug 12, 2008 1:02 pm

snadowitz wrote:probably no one visited the pages - the script can't make this happen...
You happened to be ironic and right.....working now.

Ace__
Joomla! Intern
Joomla! Intern
Posts: 64
Joined: Thu Sep 27, 2007 1:42 pm

Re: Reset all hits to ZERO

Post by Ace__ » Wed Aug 13, 2008 8:50 am

snadowitz wrote:probably no one visited the pages - the script can't make this happen...
Sorry for getting a bit OT here but do search bots etc register as hits or is it purely human users?

User avatar
snadowitz
Joomla! Guru
Joomla! Guru
Posts: 764
Joined: Wed Jan 18, 2006 4:40 am
Contact:

Re: Reset all hits to ZERO

Post by snadowitz » Fri Aug 29, 2008 9:39 am

all hits are registered.
Snadowitz

nadalbg
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Aug 29, 2008 9:39 am

Re: Reset all hits to ZERO

Post by nadalbg » Fri Aug 29, 2008 9:49 am

Ace__ wrote:
snadowitz wrote:probably no one visited the pages - the script can't make this happen...
Sorry for getting a bit OT here but do search bots etc register as hits or is it purely human users?
Everything is registered- human or bot or even something else :eek: (if there is)

Ace__
Joomla! Intern
Joomla! Intern
Posts: 64
Joined: Thu Sep 27, 2007 1:42 pm

Re: Reset all hits to ZERO

Post by Ace__ » Fri Aug 29, 2008 9:51 am

Thought that.

PS: Better late than never! ;)

User avatar
Nutman
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Thu Jan 25, 2007 10:43 pm
Location: Roskilde, Denmark
Contact:

Re: Reset all hits to ZERO

Post by Nutman » Tue Sep 02, 2008 6:58 pm

If you have tonnes of content, this SQL might be a little more efficient:

UPDATE jos_content
SET hits = '0'
WHERE hits > '0';

But I'm pretty sure you'll be just fine with the first suggestion. ;)
/Nutman

User avatar
webrp
Joomla! Guru
Joomla! Guru
Posts: 853
Joined: Sat Oct 28, 2006 9:10 pm
Location: Lisbon, Portugal

Re: Reset all hits to ZERO

Post by webrp » Thu Jan 22, 2009 7:01 am

snadowitz wrote:update jos_content set hits=0
I am always googling for "joomla reset hits" so I reach here and remember that command. Its great!

Code: Select all

select title,hits from jos_content
I am completely ignorant in mysql/php but this command is also great, I am imagining runnning a command like this in some module/article (or in index file) and output the results for visitor.
How could I achive this?
Could someone point me in the right direction?

Donaldbyers
Joomla! Apprentice
Joomla! Apprentice
Posts: 34
Joined: Sat Feb 28, 2009 9:12 pm
Location: Lubbock, Texas
Contact:

Re: Reset all hits to ZERO

Post by Donaldbyers » Fri Apr 10, 2009 3:35 pm

I have to say that I am also new to this process. I know that a lot of the hits on my page was from me when I was building it, and not done yet, so I looked for a way to do it and boy this was the Jackpot on that issue.

Thanks Sandowitz & Nutman

As stated works like a charm!!!
Don Byers

Lucas5
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Mon Apr 13, 2009 2:56 pm

Re: Reset all hits to ZERO

Post by Lucas5 » Wed Apr 15, 2009 2:15 pm

freddred wrote:Hi,

When I ran this script it reset all the hits counters to zero but they have remained at zero ever since. Any ideas why this might be?
I have same problem but i ´m sure that it´s not because no one visited ...

Ideas???

Donaldbyers
Joomla! Apprentice
Joomla! Apprentice
Posts: 34
Joined: Sat Feb 28, 2009 9:12 pm
Location: Lubbock, Texas
Contact:

Re: Reset all hits to ZERO

Post by Donaldbyers » Wed Apr 15, 2009 4:02 pm

Have you tried visiting your own page to see if the counter adds a hit? After I ran the script above I checked to see if the counters were at zero and they were. So then I made the hit counter change by going into the article and it updated to 1 hit.

Don (newbe)

Lucas5
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Mon Apr 13, 2009 2:56 pm

Re: Reset all hits to ZERO

Post by Lucas5 » Wed Apr 15, 2009 4:41 pm

Donaldbyers wrote:Have you tried visiting your own page to see if the counter adds a hit? After I ran the script above I checked to see if the counters were at zero and they were. So then I made the hit counter change by going into the article and it updated to 1 hit.

Don (newbe)
Yes I have visited it by my self and for 2 day is my site online and almost 9000 visitors too

Donaldbyers
Joomla! Apprentice
Joomla! Apprentice
Posts: 34
Joined: Sat Feb 28, 2009 9:12 pm
Location: Lubbock, Texas
Contact:

Re: Reset all hits to ZERO

Post by Donaldbyers » Wed Apr 15, 2009 5:27 pm

Wow that is a pretty active site. What is the url to your site. Wished I had a 10th of that at my site but I am still working on it www.donald-byers.com

Don

Lucas5
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Mon Apr 13, 2009 2:56 pm

Re: Reset all hits to ZERO

Post by Lucas5 » Wed Apr 15, 2009 8:15 pm

Donaldbyers wrote:Wow that is a pretty active site. What is the url to your site. Wished I had a 10th of that at my site but I am still working on it http://www.donald-byers.com

Don
I´ts a scooter shop´s homepage in Estonia

Lucas5
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Mon Apr 13, 2009 2:56 pm

Re: Reset all hits to ZERO

Post by Lucas5 » Thu Apr 16, 2009 6:13 pm

I solved my problem with messing up in PHPMyAdmin(I don´t remember what I changed but something in *_content) downgrading my site to 1.5.8 then it starts working and then re-upgrade it to 1.5.10. it was weird ...but I´m happy to get it work :P

Donaldbyers
Joomla! Apprentice
Joomla! Apprentice
Posts: 34
Joined: Sat Feb 28, 2009 9:12 pm
Location: Lubbock, Texas
Contact:

Re: Reset all hits to ZERO

Post by Donaldbyers » Thu Apr 16, 2009 8:03 pm

Glad it worked out for you!!!!

Don

cohenu
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Thu Feb 11, 2010 6:57 pm

Re: Reset all hits to ZERO

Post by cohenu » Tue Mar 16, 2010 10:37 pm

Hi Guys,
There is a way to make another counter ?
I want 1 counter to keep and 1 counter to get results every month?
uZi

weddingdj
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Wed Sep 08, 2010 5:50 pm
Location: Staffordshire, UK

Re: Reset all hits to ZERO

Post by weddingdj » Sun Oct 31, 2010 11:50 am

cohenu wrote:Hi Guys,
There is a way to make another counter ?
I want 1 counter to keep and 1 counter to get results every month?
uZi
Bumping this as I too would like this facility

radzone
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Mon Mar 26, 2007 5:26 pm

Re: Reset all hits to ZERO

Post by radzone » Mon Jan 31, 2011 8:18 pm

snadowitz wrote:using an sql script - I can't remember the exact one but you need to login to your mysql db using PHPMyAdmin and run something like:-

update jos_content set hits=0
Worked like a charm - a late thanks to you.


Locked

Return to “Administration 1.5”