Stadler
Tue 19th Nov '02, 5:17pm
Maybe I'm wrong because I'm not familiar with JOINs, but it seems to me, that remove orphan threads can't work, because the query doesn't return any threadids.
I think $threads = $DB_site->query("SELECT thread.forumid FROM thread AS thread LEFT JOIN forum AS forum USING(forumid) WHERE forum.forumid IS NULL LIMIT $startat, $perpage");should be $threads = $DB_site->query("SELECT thread.threadid FROM thread AS thread LEFT JOIN forum AS forum USING(forumid) WHERE forum.forumid IS NULL LIMIT $startat, $perpage");
[PPN: Correct fix for this bug]
I think $threads = $DB_site->query("SELECT thread.forumid FROM thread AS thread LEFT JOIN forum AS forum USING(forumid) WHERE forum.forumid IS NULL LIMIT $startat, $perpage");should be $threads = $DB_site->query("SELECT thread.threadid FROM thread AS thread LEFT JOIN forum AS forum USING(forumid) WHERE forum.forumid IS NULL LIMIT $startat, $perpage");
[PPN: Correct fix for this bug]