// Find all the posts in distinct topics. Newer ones will have higher IDs. $request = db_query(" SELECT m.posterTime, ms.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG, b.ID_BOARD, b.name AS bName, IFNULL(mem.realName, m.posterName) AS posterName, " . ($user_info['is_guest'> ? '1 AS isRead, 0 AS new_from' : ' IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, 0)) >= m.ID_MSG_MODIFIED AS isRead, IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, -1)) + 1 AS new_from') . ", LEFT(m.body, 384) AS body, m.smileysEnabled, m.icon FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b, {$db_prefix}messages AS ms) LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)" . (!$user_info['is_guest'> ? " LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER) LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = b.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER)" : '') . " WHERE t.ID_LAST_MSG >= " . ($modSettings['maxMsgID'> - 35 * min($num_recent, 5)) . " AND t.ID_LAST_MSG = m.ID_MSG AND b.ID_BOARD = t.ID_BOARD" . (empty($exclude_boards) ? '' : " AND b.ID_BOARD NOT IN (36," . implode(', ', $exclude_boards) . ")") . " AND $user_info AND ms.ID_MSG = t.ID_FIRST_MSG ORDER BY t.ID_LAST_MSG DESC LIMIT $num_recent", __FILE__, __LINE__);
AND b.ID_BOARD != $modSettings" : '') . "
AND b.ID_BOARD != เลขห้องที่ไม่ต้องการเช่น 11
โปรดรอ
cymiz.com insurance