SQL Fehler bei Auswählen des Menüpunkts Benuterliste SQL Fehler bei Auswählen des Menüpunkts Benuterliste
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

SQL Fehler bei Auswählen des Menüpunkts Benuterliste

Started by Matthias002, December 14, 2010, 11:37:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Matthias002

HUHU

ich habe leider das Problem das ich wenn ich meine Benutzerliste, unter den Menüpunkt Meine Gallery öffen möchte eine Fehlermeldung bekomme.
Die Meldung lautet im Debug-Modus:

While executing query 'SELECT user_id AS user_id, user_name AS user_name, user_email AS user_email, UNIX_TIMESTAMP(user_regdate) AS user_regdate, UNIX_TIMESTAMP(user_lastvisit) AS user_lastvisit, user_active AS user_active, COUNT(pid) AS pic_count, ROUND(SUM(total_filesize)/1024) AS disk_usage, group_name, group_quota FROM `db1014951-urlaub`.cpg15x_users AS u INNER JOIN db1014951-urlaub.cpg15x_usergroups AS g ON u.user_group = g.group_id LEFT JOIN db1014951-urlaub.cpg15x_pictures AS p ON p.owner_id = u.user_id GROUP BY user_id ORDER BY user_regdate DESC LIMIT 0, 25;' in bridge/udb_base.inc.php on line 230

mySQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-urlaub.cpg15x_usergroups AS g ON u.user_group = g.group_id LEFT JOIN db1014951-' at line 1



Weiß den jemand eine Lösung für das Problem?

MFG

MAtthias

Αndré

Öffne bridge/udb_base.inc.php, finde
        $sql = "SELECT {$f['user_id']} AS user_id, {$f['username']} AS user_name, {$f['email']} AS user_email, {$f['regdate']} AS user_regdate, {$f['lastvisit']} AS user_lastvisit, {$f['active']} AS user_active, "
               . "COUNT(pid) AS pic_count, ROUND(SUM(total_filesize)/1024) AS disk_usage, group_name, group_quota "
               . "FROM {$this->usertable} AS u "
               . "INNER JOIN {$C['dbname']}.{$C['TABLE_USERGROUPS']} AS g ON u.{$f['usertbl_group_id']} = g.group_id "
               . "LEFT JOIN {$C['dbname']}.{$C['TABLE_PICTURES']} AS p ON p.owner_id = u.{$f['user_id']} "
               . $options['search']
               . "GROUP BY user_id " . "ORDER BY " . $sort_codes[$options['sort']] . " "
               . "LIMIT {$options['lower_limit']}, {$options['users_per_page']};";

und ersetze es durch
        $sql = "SELECT {$f['user_id']} AS user_id, {$f['username']} AS user_name, {$f['email']} AS user_email, {$f['regdate']} AS user_regdate, {$f['lastvisit']} AS user_lastvisit, {$f['active']} AS user_active, "
               . "COUNT(pid) AS pic_count, ROUND(SUM(total_filesize)/1024) AS disk_usage, group_name, group_quota "
               . "FROM {$this->usertable} AS u "
               . "INNER JOIN `{$C['dbname']}`.{$C['TABLE_USERGROUPS']} AS g ON u.{$f['usertbl_group_id']} = g.group_id "
               . "LEFT JOIN `{$C['dbname']}`.{$C['TABLE_PICTURES']} AS p ON p.owner_id = u.{$f['user_id']} "
               . $options['search']
               . "GROUP BY user_id " . "ORDER BY " . $sort_codes[$options['sort']] . " "
               . "LIMIT {$options['lower_limit']}, {$options['users_per_page']};";



Bitte bestätige ob es damit funktioniert, da ich diese Änderung dann so einpflegen kann.

Matthias002

Wau, ich glaube du kannst zaubern :-), es funktioniert.
Vielen Dank

Magst du mir bitte sagen, wo der fehler lag, und warum die anderen Coppermine user, das Problem nicht haben?

MFG

Matthias

Αndré

Scheinbar hat bisher niemand einen Datenbanknamen mit Bindestrich benutzt. Deine Datenbank heißt "db1014951-urlaub". Anhand der Fehlermeldung
Quotenear '-urlaub.cpg15x_usergroups
war das das Naheliegendste ;)

Ich habe die Änderungen in SVN-Revision 8137 eingepflegt.