Viewing Issue Advanced Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000140 [phpBBGarage] General crash always 2008-11-20 00:15 2010-06-20 12:05
Reporter LOSer View Status public  
Assigned To
Priority normal Resolution open Platform
Status new   OS
Projection none   OS Version
ETA none Fixed in Version Product Version 2.0.B3
  Target Version Product Build B4-DEV
Summary 0000140: problem with memberlist
Description i get an error if i want to see the memberlist of a certain usergroup:

SQL ERROR [ mysqli ]

Unknown column 'u.user_id' in 'on clause' [1054]

SQL

SELECT u.user_id, v.id as vid FROM phpbb_users u , phpbb_user_group ug LEFT JOIN phpbb_garage_vehicles v ON ( v.user_id = u.user_id AND v.main_vehicle = 1 ) WHERE u.user_type IN (0, 3) AND ug.user_pending = 0 AND u.user_id = ug.user_id AND ug.group_id = 19 ORDER BY ug.group_leader DESC, u.user_regdate ASC LIMIT 25


it seems to relate to the following code-changes in memberlist.php:

    // Get us some users :D
        $sql = "SELECT u.user_id, v.id as vid
            FROM " . USERS_TABLE . " u
                $sql_from
            LEFT JOIN " . GARAGE_VEHICLES_TABLE . " v
                ON (
                    v.user_id = u.user_id AND v.main_vehicle = 1
                )
Steps To Reproduce select a usergroup (memberlist.php?mode=group)
Additional Information Thread:
http://forums.phpbbgarage.com/viewtopic.php?f=4&t=898 [^]
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0000309)
PaulusB_TT (reporter)
2008-12-23 06:24

I have the same problem.

SQL ERROR [ mysqli ]

Unknown column 'u.user_id' in 'on clause' [1054]

SQL

SELECT u.user_id, v.id as vid FROM phpbb_users u , phpbb_user_group ug LEFT JOIN phpbb_garage_vehicles v ON ( v.user_id = u.user_id AND v.main_vehicle = 1 ) WHERE u.user_type IN (0, 3) AND ug.user_pending = 0 AND u.user_id = ug.user_id AND ug.group_id = 4 ORDER BY ug.group_leader DESC, u.user_regdate ASC LIMIT 25

BACKTRACE


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

FILE: includes/db/mysqli.php
LINE: 205
CALL: dbal_mysqli->sql_query()

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

FILE: memberlist.php
LINE: 1456
CALL: dbal->sql_query_limit()
(0000341)
ZloboMiR (reporter)
2010-06-20 12:05

After some looking on the forum, I asked for help my friend, and after some looking on the forum he found a post by HandyMann (sorry if nick slightly differs). Make the following change in memberlist.php :

the below to be put instead of the present code in the file:

--------------------------------------------------

// Get us some users :D
      $sql = "SELECT u.user_id, v.id as vid
         FROM ( " . USERS_TABLE . " u
            $sql_from
         ) LEFT JOIN " . GARAGE_VEHICLES_TABLE . " v
            ON (
               v.user_id = u.user_id AND v.main_vehicle = 1
            )

-----------------------------------

- Issue History
Date Modified Username Field Change
2008-11-20 00:15 LOSer New Issue
2008-12-23 06:24 PaulusB_TT Note Added: 0000309
2010-06-20 12:05 ZloboMiR Note Added: 0000341
cron