Found and corrected SQL Bug

Current Version: 1.0.6
Released: 09.01.10
Forum rules
Before creating a new support thread, please take a look in the board3 Portal FAQ and use the search!
Many questions have already been answered.
Locked

Topic author
sailsfast
Active Member
Posts: 2
Joined: 30. July 2009 15:35

Found and corrected SQL Bug

Post by sailsfast »

Your Portal Version: 1.0.3
Your phpBB Type: Standard phpBB3
MODs installed: No
Your knowledge: Beginner

MySQL Version: Postgres not MySQL

What have you done before the problem was there?
Installed Board3
edited files
ran install


What have you already tryed to solve the problem?
Debugged SQL the error.

Presumably you might want to include this in your next release. :-)


Description and Message
After installing properly... Opening the portal resulted in this

Code: Select all

SQL ERROR [ postgres ]

ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list []

SQL

SELECT DISTINCT u.user_id, u.username, u.user_colour, u.user_allow_viewonline, MAX(s.session_time) as online_time, MIN(s.session_viewonline) AS viewonline FROM phpbb_users u, phpbb_zebra z LEFT JOIN phpbb_sessions s ON (s.session_user_id = z.zebra_id) WHERE z.user_id = 2 AND z.friend = 1 AND u.user_id = z.zebra_id GROUP BY z.zebra_id, u.user_id, u.username, u.user_allow_viewonline, u.user_colour ORDER BY u.username_clean ASC LIMIT 8 OFFSET 0

BACKTRACE

FILE: includes/db/postgres.php
LINE: 177
CALL: dbal->sql_error()

FILE: includes/db/postgres.php
LINE: 232
CALL: dbal_postgres->sql_query()

FILE: includes/db/dbal.php
LINE: 170
CALL: dbal_postgres->_sql_query_limit()

FILE: portal/block/friends.php
LINE: 78
CALL: dbal->sql_query_limit()

FILE: portal.php
LINE: 243
CALL: include('portal/block/friends.php')
To RESOLVE the error

The select doesn't match....

Find FILE: portal/block/friends.php

Goto line 73
and change u.username_clean to u.username

OR
add:
_clean to u.username

in the preceding select statment[/i]
User avatar

Christian_N
Former Team Member
Posts: 2266
Joined: 19. January 2008 01:17
phpBB.de User: Christian_N
phpBB.com User: Christian_N
Location: Frankfurt
Contact:

Re: Found and corrected SQL Bug

Post by Christian_N »

Thank you for report.
Fixed in SVN: http://board3deportal.svn.sourceforge.n ... athrev=522
Meine Projekte: Chantals - Fanpage .::. phpBB Projekt
No support via PM, email or messenger!
Locked

Return to “board3 Portal 1.0.x - English Support”