PHP-Code:
$maxshow = db_query ('SELECT '.$db_feld.' max_forced, art, sort FROM '.$db_prefix.'_userdaten WHERE uid = '.$_SESSION['uid'].' LIMIT 1');
max_forced kannst du weg lassen. Möglichweise ist $db_feld sogar max_forced. Am Anfang der Datei sollte sowas wie $db_feld = 'xxx'; stehen.
Also:
PHP-Code:
$maxshow = db_query ('SELECT '.$db_feld.', art, sort FROM '.$db_prefix.'_userdaten WHERE uid = '.$_SESSION['uid'].' LIMIT 1');
ORDER BY dann so ändern:
PHP-Code:
ORDER BY t1.'.$maxshow['art'].' '.$maxshow['sort'].'