Lapidary / Gemstone Community Forum
September 19, 2019, 05:51:42 pm
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Login Register  
Database Error
Please try again. If you come back to this error screen, report the error to an administrator.


SELECT
c.name AS catName, c.ID_CAT, b.ID_BOARD, b.name AS boardName, b.description,
b.numPosts, b.numTopics, b.ID_PARENT, IFNULL(m.posterTime, 0) AS posterTime,
IFNULL(mem.memberName, m.posterName) AS posterName, m.subject, m.ID_TOPIC,
IFNULL(mem.realName, m.posterName) AS realName,
1 AS isRead, 0 AS new_from,
IFNULL(mem.ID_MEMBER, 0) AS ID_MEMBER, m.ID_MSG,
IFNULL(mods_mem.ID_MEMBER, 0) AS ID_MODERATOR, mods_mem.realName AS modRealName
FROM gemstone_boards AS b
LEFT JOIN gemstone_categories AS c ON (c.ID_CAT = b.ID_CAT)
LEFT JOIN gemstone_messages AS m ON (m.ID_MSG = b.ID_LAST_MSG)
LEFT JOIN gemstone_members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)
LEFT JOIN gemstone_moderators AS mods ON (mods.ID_BOARD = b.ID_BOARD)
LEFT JOIN gemstone_members AS mods_mem ON (mods_mem.ID_MEMBER = mods.ID_MEMBER)
WHERE FIND_IN_SET(-1, b.memberGroups)
AND b.childLevel <= 1 ORDER BY b.boardOrder
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy