Este es la consulta que hago para los post:
Código PHP:
//Consulta de posts normales
$request=db_query("
SELECT m.ID_MEMBER, m.ID_TOPIC, m.body, m.imgport, c.ID_CAT, subject, c.name, t.ID_BOARD, posterName, puntos, m.hiddenOption, posterTime, denuncias
FROM {$db_prefix}messages as m, {$db_prefix}boards as c, {$db_prefix}topics as t
WHERE c.ID_BOARD=m.ID_BOARD AND t.ID_TOPIC=m.ID_TOPIC AND t.isSticky = 0 {$cat_condition}
AND c.ID_CAT != 12 " . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND c.ID_BOARD != $modSettings[recycle_board]" : '') . "
ORDER BY m.ID_TOPIC DESC
LIMIT $RegistrosAEmpezar,$limit_posts", __FILE__, __LINE__);