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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

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

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

Number of site displays


Go to End


20 Posts   2778 Views

Avatar
sebastiankozub

Community Member, 59 Posts

5 November 2010 at 11:43am

page
page_live
page_versions

all those tables have everywhere visits = 0 :/

Avatar
sebastiankozub

Community Member, 59 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, 59 Posts

9 November 2010 at 5:36am

Anybody see the mistake?

Avatar
bartvanirsel

Community Member, 96 Posts

9 November 2010 at 9:51am

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

Avatar
sebastiankozub

Community Member, 59 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, 96 Posts

9 November 2010 at 9:09pm

Do you see queries for incrementing Visits there?

Avatar
sebastiankozub

Community Member, 59 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, 96 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