SELECT a.id, a.title, a.sectionid, a.catid, a.created, a.introtext, a.fulltext, a.images, cc.title AS catname, u.name AS author, u.username as author_alias, a.access
FROM #__content AS a
LEFT JOIN #__content_frontpage AS f ON f.content_id = a.id
INNER JOIN #__categories AS cc ON cc.id = a.catid
INNER JOIN #__sections AS s ON s.id = a.sectionid
INNER JOIN #__users AS u ON u.id = a.created_by
WHERE ( a.state = 1 )
AND ( a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2010-02-08 23:59' )
AND ( a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2010-02-08 22:53' )
AND a.access <= 0 AND cc.access <= 0 AND s.access <= 0
AND ( a.catid IN ( 36 ) )
AND s.published = 1
AND cc.published = 1
ORDER BY a.created DESC
LIMIT 2