[HELP]error when create forum

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Anti-Spam Guide
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
oeishi
Registered User
Posts: 2
Joined: Thu Jan 10, 2008 12:30 pm

[HELP]error when create forum

Post by oeishi »

I use MIcrosoft SQL 2005 when I create Forum got error below (sorry for my eng)




SQL ERROR [ mssql_odbc ]

[Microsoft][ODBC SQL Server Driver][SQL Server]ORDER BY items must appear in the select list if SELECT DISTINCT is specified. [37000]

SQL

SELECT DISTINCT u.user_id, u.username FROM jboforum_users u, jboforum_acl_users a WHERE u.user_id = a.user_id AND a.forum_id = 3 AND (a.auth_option_id IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30) OR a.auth_role_id IN (14, 15, 16, 17, 18, 19, 20, 21, 22)) ORDER BY u.username_clean, u.user_regdate ASC

BACKTRACE


FILE: includes/db/mssql_odbc.php
LINE: 149
CALL: dbal->sql_error()

FILE: includes/acp/acp_permissions.php
LINE: 1165
CALL: dbal_mssql_odbc->sql_query()

FILE: includes/acp/acp_permissions.php
LINE: 399
CALL: acp_permissions->retrieve_defined_user_groups()

FILE: includes/functions_module.php
LINE: 471
CALL: acp_permissions->main()

FILE: adm/index.php
LINE: 74
CALL: p_master->load_active()

skinmaster
Registered User
Posts: 32
Joined: Tue Feb 17, 2004 7:46 am

Re: [HELP]error when create forum

Post by skinmaster »

Yes, I have the same issue.

Is there a known fix/workround?

Vintage51
Registered User
Posts: 1
Joined: Fri May 30, 2008 1:54 pm

Re: [HELP]error when create forum

Post by Vintage51 »

This is how I fixed this issue. I went into the directory C:\Inetpub\wwwroot\phpBB3\includes\acp\. I opened acp_permissions.php file into wordpad. I then searched for part of the sql statement that caused the problem (near the bottom of file) and then commented out the order by part of the statement ( Put 2 dashes in front of the order by). I don't know if this is the right way to solve the problem but it go me past the error.

pkailas
Registered User
Posts: 30
Joined: Sun Jun 01, 2008 8:37 pm

Re: [HELP]error when create forum

Post by pkailas »

This is how I fixed this issue. I went into the directory C:\Inetpub\wwwroot\phpBB3\includes\acp\. I opened acp_permissions.php file into wordpad. I then searched for part of the sql statement that caused the problem (near the bottom of file) and then commented out the order by part of the statement ( Put 2 dashes in front of the order by). I don't know if this is the right way to solve the problem but it go me past the error.
Actually if you add the fields that are in the Order By, to the SELECT fields you will fix it the correct way. The error is telling you that you can't order by a column that you haven't selected a query on.

Locked

Return to “[3.0.x] Support Forum”