Can't you find out by examining the code that determines read and unread status of topics? Either this would contain some "hard" fallback value, or it just involves the mark times you already noticed. Personally, I expect the latter, because you will need some kind of cleanup mechanism anyway; if a particular user never marks forums read - at which time I would expect individual topic mark times to be cleaned up - then the tables could fill up with individual topic mark times. So, some specific action to also limit the number of unread topics shown when they need to be displayed seems to be redundant..Johnny wrote:some older topics below a certain threshold are read whilst newer topics arent. what is that treshold?
Code: Select all
SELECT * FROM ( SELECT t.topic_id, t.topic_last_post_time tlpt ,tt.mark_time as tmt, ft.mark_time as fmt, u.user_lastmark as umt FROM phpbb3_users u, phpbb3_topics t LEFT JOIN phpbb3_topics_track tt ON tt.topic_id = t.topic_id AND tt.user_id=4 LEFT JOIN phpbb3_forums_track ft ON ft.forum_id=t.forum_id AND ft.user_id=4 WHERE u.user_id=4 AND topic_last_post_time > u.user_lastmark ) marktimes WHERE 1 AND NOT ((tlpt <= tmt AND NOT ISNULL(tmt)) OR (tlpt <= fmt AND NOT ISNULL(fmt)))