SELECT i.*, CASE WHEN i.modified = 0 THEN i.created ELSE i.modified END as lastChanged, c.name AS categoryname,c.id AS categoryid, c.alias AS categoryalias, c.params AS categoryparams, u.userName AS nomeColunista , u.image AS imgColunista , u.userID AS idColunista FROM #__k2_items as i RIGHT JOIN #__k2_categories c ON c.id = i.catid LEFT JOIN #__k2_users u ON u.userID = i.created_by WHERE i.published = 1 AND i.access IN(1,1,5) AND i.trash = 0 AND c.published = 1 AND c.trash = 0 AND ( i.publish_up = '0000-00-00 00:00:00' OR i.publish_up <= '2024-12-27 18:49:46' ) AND ( i.publish_down = '0000-00-00 00:00:00' OR i.publish_down >= '2024-12-27 18:49:46' ) AND i.catid=30 AND i.catid IN(30) OR i.id IN (SELECT itemID FROM #__k2_additional_categories WHERE catid IN(30 ) ) ORDER BY i.publish_up DESC LIMIT 0 , 2