Problem with PHPstatistic 103

Current Version: 1.0.2
Released: 04/25/2010
Danny.l
Newbie
Newbie
Beiträge: 4
Registriert: So 20. Mär 2011, 21:06
phpbb.com: Danny L
Wohnort: Lommel / Belgium

Problem with PHPstatistic 103

Beitrag von Danny.l »

I've installed the newest version of PHPstatistics (103)
Strange this version is not on this site, because the link in this MOD is to this site.

My question / problem.

The works fine, BUT:
on the tab-"forum activities" and then on user statistics I've got this error-page:

Code: Alles auswählen

Algemene fout
SQL ERROR [ mysqli ]

Unknown column 'user_type' in 'where clause' [1054]

SQL

SELECT (MAX(user_id) - (MAX(user_id) - COUNT(user_id))) AS total FROM phpbb_users WHERE user_type <> 1

BACKTRACE


FILE: includes/db/mysqli.php
LINE: 163
CALL: dbal->sql_error()

FILE: statistics/includes/functions.php
LINE: 827
CALL: dbal_mysqli->sql_query()

FILE: includes/stats/stats_activity.php
LINE: 442
CALL: get_total_members()

FILE: includes/functions_module.php
LINE: 507
CALL: stats_activity->main()

FILE: stats.php
LINE: 71
CALL: p_master->load_active()



This is the link were I found the MOD:
http://www.phpbb.com/customise/db/mod/phpbb_statistics
Can someone please tell me what the problem is?
Anything else works fine :?
Benutzeravatar
Marc
Administrator
Administrator
Beiträge: 620
Registriert: Di 2. Sep 2008, 23:48
phpbb.com: Marc
Wohnort: Munich

Re: Problem with PHPstatistic 103

Beitrag von Marc »

If you do not have the column user_type, then something is wrong with your forum.
Bild
Danny.l
Newbie
Newbie
Beiträge: 4
Registriert: So 20. Mär 2011, 21:06
phpbb.com: Danny L
Wohnort: Lommel / Belgium

Re: Problem with PHPstatistic 103

Beitrag von Danny.l »

I do have the column user_group
I've made a printscreen
user_group.png
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Benutzeravatar
Marc
Administrator
Administrator
Beiträge: 620
Registriert: Di 2. Sep 2008, 23:48
phpbb.com: Marc
Wohnort: Munich

Re: Problem with PHPstatistic 103

Beitrag von Marc »

The table it selects from is phpbb3_users in your case. ;)
Bild
Danny.l
Newbie
Newbie
Beiträge: 4
Registriert: So 20. Mär 2011, 21:06
phpbb.com: Danny L
Wohnort: Lommel / Belgium

Re: Problem with PHPstatistic 103

Beitrag von Danny.l »

My complete database is like phpBB3_xxxxxx, this is because I specified it this way.
Al the extra colomn added for this MOD are also phpBB3_xxxx, no furter problem....
But I don't have a column phpBB3_user_type :o
Must I create one?
How comes I don't have this, do I need it?
My forum is working perfect, I don't see anywhere else a problem.
Zuletzt geändert von Danny.l am Sa 26. Mär 2011, 12:45, insgesamt 1-mal geändert.
Benutzeravatar
Marc
Administrator
Administrator
Beiträge: 620
Registriert: Di 2. Sep 2008, 23:48
phpbb.com: Marc
Wohnort: Munich

Re: Problem with PHPstatistic 103

Beitrag von Marc »

Now I get what your error is, I guess that error message is kind of unexpected. Anyhow, apply the change to statistics/includes/functions.php:
https://github.com/marc1706/phpBB-Stati ... 1.0#diff-1
Bild
Danny.l
Newbie
Newbie
Beiträge: 4
Registriert: So 20. Mär 2011, 21:06
phpbb.com: Danny L
Wohnort: Lommel / Belgium

Re: Problem with PHPstatistic 103

Beitrag von Danny.l »

Thankx, this did it.