Page 1 of 1

Problem with PHPstatistic 103

Posted: Sun 20. Mar 2011, 20:17
by 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: Select all

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 :?

Re: Problem with PHPstatistic 103

Posted: Mon 21. Mar 2011, 10:29
by Marc
If you do not have the column user_type, then something is wrong with your forum.

Re: Problem with PHPstatistic 103

Posted: Mon 21. Mar 2011, 19:11
by Danny.l
I do have the column user_group
I've made a printscreen
printscreen
printscreen
user_group.png (44.72 KiB) Viewed 38780 times

Re: Problem with PHPstatistic 103

Posted: Thu 24. Mar 2011, 19:36
by Marc
The table it selects from is phpbb3_users in your case. ;)

Re: Problem with PHPstatistic 103

Posted: Thu 24. Mar 2011, 20:39
by 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.

Re: Problem with PHPstatistic 103

Posted: Fri 25. Mar 2011, 07:04
by 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

Re: Problem with PHPstatistic 103

Posted: Sat 26. Mar 2011, 11:32
by Danny.l
Thankx, this did it.