// if($database && ($database->_table_prefix == $mosConfig_dbprefix)) {// return true;// } else { $database = new database( $mosConfig_host, $mosConfig_user, $mosConfig_password, $mosConfig_db, $mosConfig_dbprefix, $mosConfig_dbtype ); $database->debug( $mosConfig_debug ); $GLOBALS['database'] = &$database;// }
(mysql): SELECT mem.realName, m.posterTime, ms.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG, b.ID_BOARD, b.name AS bName, t.numReplies, t.ID_LAST_MSG, IFNULL(mem.realName, m.posterName) AS posterName, 1 AS isRead, 0 AS new_from, LEFT(m.body, 384) AS body, m.smileysEnabled, m.icon FROM (smf_messages AS m, smf_topics AS t, smf_boards AS b, smf_messages AS ms) LEFT JOIN smf_members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER) WHERE t.ID_LAST_MSG >= -169 AND t.ID_LAST_MSG = m.ID_MSG AND b.ID_BOARD = t.ID_BOARD AND FIND_IN_SET(-1, b.memberGroups) AND ms.ID_MSG = t.ID_FIRST_MSG ORDER BY t.ID_LAST_MSG DESC LIMIT 0,5