Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Number of site displays


Reply


20 Posts   2137 Views

Avatar
sebastiankozub

Community Member, 40 Posts

5 November 2010 at 11:43am

page       
page_live    
page_versions

all those tables have everywhere visits = 0 :/

Avatar
sebastiankozub

Community Member, 40 Posts

6 November 2010 at 9:03am

I created:

   public static $db = array(
      'ShowInTopMenu' => 'Boolean',
      'ShowInLeftMenu' => 'Boolean',
      'ShowInLeftMenu2' => 'Boolean',
      'visits' => 'Int'
   );

in class Page and:

   $this->visits++;
   $this->write();

in class Page_Controller. Is $this->visits++ correct operation to increment 'visits' in $db?

Avatar
sebastiankozub

Community Member, 40 Posts

9 November 2010 at 5:36am

Anybody see the mistake?

Avatar
bartvanirsel

Community Member, 94 Posts

9 November 2010 at 9:51am

What do you see when debugging SQL using ?showqueries=1 ?

Avatar
sebastiankozub

Community Member, 40 Posts

9 November 2010 at 7:50pm

I see nothing, when I am logged page is opening but no warnings and error show

Avatar
bartvanirsel

Community Member, 94 Posts

9 November 2010 at 9:09pm

Do you see queries for incrementing Visits there?

Avatar
sebastiankozub

Community Member, 40 Posts

10 November 2010 at 1:03am

Do I have to be logged as Admin?
I can't see any difference between page with ?showqueries=1 and page without it

Avatar
bartvanirsel

Community Member, 94 Posts

10 November 2010 at 1:13am

you need to be logged in as admin, and maybe the domain should be in dev servers list