Hier mal zum selber ansehen:
http://www.springenderhund.de/forum,271 ... sen-d.html
Hab den Code etwas angepasst:
Code: Alles auswählen
if ($forum_row['forum_sort'] == "SORT_ALPHA")
{
$topic_order = "bild_da DESC"; //t.topic_picture DESC, t.topic_title ASC";
}
else
{
$topic_order = "topic_last_post_id DESC";
}
$sql = "(SELECT 1 as bild_da,t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time, p2.post_edit_time
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2
WHERE t.forum_id = $forum_id
AND t.topic_poster = u.user_id
AND p.post_id = t.topic_first_post_id
AND p2.post_id = t.topic_last_post_id
AND u2.user_id = p2.poster_id
AND t.topic_type = " . POST_STICKY . "
$limit_topics_time
$ignore_tarbed
AND t.topic_picture <> ''
ORDER BY topic_title ASC
) UNION (SELECT 0 as bild_da,t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time, p2.post_edit_time
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2
WHERE t.forum_id = $forum_id
AND t.topic_poster = u.user_id
AND p.post_id = t.topic_first_post_id
AND p2.post_id = t.topic_last_post_id
AND u2.user_id = p2.poster_id
AND t.topic_type = " . POST_STICKY . "
AND t.topic_picture = ''
$limit_topics_time
$ignore_tarbed
ORDER BY topic_last_post_id DESC)
ORDER BY $topic_order
LIMIT $start, ".$board_config['topics_per_page'];
Ja das stimmt, nur hätte er Sie nicht anzeigen wollen wär meine antwort mit where richtig gewesen
