SELECT
s.id AS sid, s.ses_id, s.data, s.returnto, s.sys_id,
t.id AS theme_id, t.lang, t.name AS theme_name, t.locale, t.theme, t.pspell_lang, t.theme_opt,
u.alias, u.posts_ppg, u.time_zone, u.sig, u.last_visit, u.last_read, u.cat_collapse_status, u.users_opt, u.topics_per_page,
u.ignore_list, u.ignore_list, u.buddy_list, u.id, u.group_leader_list, u.email, u.login, u.sq, u.ban_expiry, u.flag_cc
FROM fud25_ses s
INNER JOIN fud25_users u ON u.id=(CASE WHEN s.user_id>2000000000 THEN 1 ELSE s.user_id END)
INNER JOIN fud25_themes t ON t.id=u.theme
WHERE s.ses_id='3e73c29b399ccf6e6ec15a6368fa8ea1'UPDATE fud25_users SET last_visit=1158780607 WHERE id=3UPDATE fud25_ses SET sys_id='', forum_id=0, time_sec=1158780607, action='Browsing the <a href="index.php?t=index">forum list</a>', returnto='t=index&rid=0' WHERE id=28311SELECT count(*) FROM fud25_msg_report mr INNER JOIN fud25_msg m ON mr.msg_id=m.id INNER JOIN fud25_thread t ON m.thread_id=t.id INNER JOIN fud25_mod mm ON t.forum_id=mm.forum_id AND mm.user_id=3SELECT count(*) FROM fud25_thr_exchange te INNER JOIN fud25_mod m ON m.user_id=3 AND te.frm=m.forum_idSELECT count(*) FROM fud25_msg m INNER JOIN fud25_thread t ON m.thread_id=t.id INNER JOIN fud25_forum f ON t.forum_id=f.id INNER JOIN fud25_mod mm ON f.id=mm.forum_id AND mm.user_id=3 WHERE m.apr=0 AND (f.forum_opt>=2 AND (f.forum_opt & 2) > 0)SELECT count(*) FROM fud25_pmsg WHERE duser_id=3 AND fldr=1 AND read_stamp=0SELECT
m.subject, m.id, m.post_stamp,
u.id, u.alias,
f.cat_id, f.forum_icon, f.id, f.last_post_id, f.moderators, f.name, f.descr, f.post_count, f.thread_count,
fr.last_view, mo.id, COALESCE(g2.group_cache_opt, g1.group_cache_opt) AS group_cache_opt,
c.cat_opt & 4
FROM fud25_fc_view v
INNER JOIN fud25_cat c ON c.id=v.c
INNER JOIN fud25_forum f ON f.id=v.f
INNER JOIN fud25_group_cache g1 ON g1.user_id=2147483647 AND g1.resource_id=f.id
LEFT JOIN fud25_msg m ON f.last_post_id=m.id
LEFT JOIN fud25_users u ON u.id=m.poster_id LEFT JOIN fud25_forum_read fr ON fr.forum_id=f.id AND fr.user_id=3 LEFT JOIN fud25_mod mo ON mo.user_id=3 AND mo.forum_id=f.id LEFT JOIN fud25_group_cache g2 ON g2.user_id=3 AND g2.resource_id=f.id WHERE (mo.id IS NOT NULL OR (COALESCE(g2.group_cache_opt, g1.group_cache_opt)) & 1)>0 ORDER BY v.id