Zen Cart Logo
Forums / General Questions / Counter History Database?

Counter History Database?

Locked

Views: 2,762

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
17 May 2007, 12:51 PM
#1
bradsmith avatar

bradsmith

New Zenner

Join Date:
Jan 2007
Posts:
50
Plugin Contributions:
0

Counter History Database?

I would like to view the entire stored counter history... where can I find these numbers?

Brad Smith, Serigraph Printer
https://www.RickRushArt.com

17 May 2007, 1:54 PM
#2
dasonix avatar

dasonix

New Zenner

Join Date:
Sep 2006
Posts:
79
Plugin Contributions:
0

Re: Counter History Database?

is in the database. easy to find as it has its own section.

17 May 2007, 6:08 PM
#3
bradsmith avatar

bradsmith

New Zenner

Join Date:
Jan 2007
Posts:
50
Plugin Contributions:
0

Re: Counter History Database?

I can't find it, could you be more specific as to its location?

Brad Smith, Serigraph Printer
https://www.RickRushArt.com

18 May 2007, 2:52 PM
#4
bradsmith avatar

bradsmith

New Zenner

Join Date:
Jan 2007
Posts:
50
Plugin Contributions:
0

Re: Counter History Database?

Bumping this... I'm trying to put together a report of the hits and views, I just need to know where to find where the numbers are stored.

Brad Smith, Serigraph Printer
https://www.RickRushArt.com

18 May 2007, 6:53 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Counter History Database?

In your database there's a table with a moderately intuitive name: "counter_history", which stores hit/session counts per day

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

18 May 2007, 7:54 PM
#6
bradsmith avatar

bradsmith

New Zenner

Join Date:
Jan 2007
Posts:
50
Plugin Contributions:
0

Re: Counter History Database?

I'm still learning, here. Can I access the table through the Admin page, or do I have to access the database by a remote SQL (like FTP?)?

Brad Smith, Serigraph Printer
https://www.RickRushArt.com

18 May 2007, 8:00 PM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Counter History Database?

No, you cannot use FTP. You would need to use a MySQL front-end tool like phpMyAdmin or write custom PHP code to access it.

Perhaps more important is the "why" behind your inquiry. What exactly are you wanting to do?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

18 May 2007, 8:06 PM
#8
bradsmith avatar

bradsmith

New Zenner

Join Date:
Jan 2007
Posts:
50
Plugin Contributions:
0

Re: Counter History Database?

I'm going to be recording the numbers onto a Line Chart in Word so that I can have some documentation of the growth trend. The Admin page records the last 7 days, but I read that it keeps the past year in its base... so I want to record all of those numbers.

Brad Smith, Serigraph Printer
https://www.RickRushArt.com

18 May 2007, 8:23 PM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Counter History Database?

Probably best to use phpMyAdmin (likely comes with your hosting control panel) to access the raw data.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 May 2007, 7:59 PM
#10
jvoce avatar

jvoce

New Zenner

Join Date:
Jul 2006
Location:
Toronto, ON
Posts:
87
Plugin Contributions:
0

Re: Counter History Database?

Why don't you use the Google Analytics Module?

Google Analytics can keep track of all your hits, which pages were viewed the most, what region people visited from, and tons of other cool stuff. For more information on what Google Anaylics can do check out their site.

24 Jul 2007, 6:27 PM
#11
jakedownhere avatar

jakedownhere

New Zenner

Join Date:
Aug 2006
Posts:
38
Plugin Contributions:
0

Re: Counter History Database?

BradSmith:

The Admin page records the last 7 days, but I read that it keeps the past year in its base... so I want to record all of those numbers.

Howdy all!

Read this looking for those past numbers myself and just did this to my page:

In your ADMIN directory, edit the file index.php
Find this line:

$counter_query = "select startdate, counter, session_counter from " . TABLE_COUNTER_HISTORY . " order by startdate DESC limit 10";


Change the "10" to "365" or however many dates you want displayed. Granted your page will be longer, sure... but at least you get the past year's worth of counter info easily.

You can also put it into an iFrame to keep the page short. Or, for that matter, a textarea box.

Good luck!

Jake