SELECT a.*, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(':', a.id, a.alias) ELSE a.id END as slug, CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(':', cc.id, cc.alias) ELSE cc.id END as catslug FROM #__content AS a INNER JOIN #__content_frontpage AS f ON f.content_id = a.id INNER JOIN #__categories AS cc ON cc.id = a.catid WHERE ( a.state = 1 AND a.sectionid > 0 AND (a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2014-04-21 15:09:40' ) AND (a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2014-04-21 15:09:40' ) AND a.access <= 0 AND cc.access <= 0 AND cc.published = 1 ) ORDER BY a.created DESC, f.ordering ASC





Pengumuman